/* assets/css/style.css (Comprehensive & Final Version - Duplicates Consolidated) */

/* --- CSS Variables for Theming --- */
:root {
    --primary-color: #4a90e2; 
    --primary-color-dark: #357ABD; 
    --secondary-color: #50e3c2; 
    --background-color: #f0f2f5; 
    --surface-color: #ffffff;   
    --text-color: #2c3e50;       
    --text-color-light: #5a7184; 
    --border-color: #dfe1e5;     
    --success-color: #28a745;   
    --error-color: #dc3545;     
    --warning-color: #f9a825;   
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.09); 
    --border-radius: 12px; /* Final value from multiple definitions */       
    --font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* --- Dark Mode Variables --- */
html.dark-mode-html {
    --primary-color: #58a6ff;
    --primary-color-dark: #3a8cff;
    --secondary-color: #3ddda0;
    --background-color: #121212; /* Final value from multiple definitions */
    --surface-color: #1e1e1e;   /* Final value from multiple definitions */
    --text-color: #e0e0e0;      /* Final value from multiple definitions */
    --text-color-light: #a0a0a0; /* Final value from multiple definitions */
    --border-color: #333;     /* Final value from multiple definitions */
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.25); /* Final value from multiple definitions */
}

/* --- Universal Box-Sizing & Base Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
li {
    list-style: none; /* Base list style, can be overridden */
}
html {
    scroll-behavior: smooth;
}
body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.8;
    font-size: 16px;
    transition: background-color 0.3s, color 0.3s; /* Only defined once, kept */
}

/* --- Dark Mode Body Override --- */
html.dark-mode-html body {
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
}

/* --- Aparat Embed Frame Styles --- */
.h_iframe-aparat_embed_frame {
  position: relative;
  padding-bottom: 56.25%; 
  height: 0;
  overflow: hidden;
}
.h_iframe-aparat_embed_frame iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* --- Container for Page Content --- */
.container {
    width: 90%; /* Final width */
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px; /* Padding for mobile edges, final value */
}
.section {
    padding: 80px 0;
}

/* --- Headings --- */
h1, h2, h3, h4 {
    font-weight: 800;
    color: var(--text-color);
    margin-bottom: 1rem;
}
h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.2rem; }

/* --- Paragraphs --- */
p {
    color: var(--text-color-light);
    margin-bottom: 1rem;
}

/* --- Links (General) --- */
a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s;
}
a:hover {
    color: var(--primary-color-dark);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: all 0.3s ease; /* Consolidated from 0.2s and 0.3s */
    cursor: pointer;
    border: none;
    box-sizing: border-box; /* Consolidated from btn-specific */
    white-space: nowrap; /* Consolidated from btn-specific */
}

/* --- Primary Button --- */
.btn-primary {
    background-color: var(--primary-color);
    color: white !important;
    border: 1px solid var(--primary-color);
}
.btn-primary:hover:not(:disabled) { /* Consolidated from btn-primary:hover and btn-primary:hover:not(:disabled) */
    background-color: var(--primary-color-dark);
    border-color: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Specific shadow for primary */
}
.btn-primary:hover { /* More general hover, ensure it matches :not(:disabled) */
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* --- Secondary Button --- */
.btn-secondary {
    background-color: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
}
.btn-secondary:hover:not(:disabled) {
    background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
    color: var(--primary-color-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
.btn-secondary:hover { /* General hover */
    background-color: color-mix(in srgb, var(--primary-color) 10%, transparent);
}

/* --- Warning Button --- */
.btn-warning {
    background-color: var(--warning-color);
    color: white !important; /* !important to override general link color */
    border: 1px solid var(--warning-color);
}
.btn-warning:hover:not(:disabled) {
    background-color: #f59f00;
    border-color: #f59f00;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.btn-warning:hover {
    background-color: #f59f00;
}

/* --- Danger Button --- */
.btn-danger {
    background-color: var(--error-color);
    color: white !important; /* !important to override general link color */
    border: 1px solid var(--error-color);
}
.btn-danger:hover:not(:disabled) {
    background-color: #c82333;
    border-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}
.btn-danger:hover {
    background-color: #c82333;
}

/* --- Disabled Button State (for .btn classes) --- */
.btn:disabled {
    background-color: #a0a0a0 !important;
    color: #e0e0e0 !important;
    border-color: #a0a0a0 !important;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.8;
}

/* --- Generic Button (for <button> tag) --- */
button { /* This applies to all <button> elements not specifically styled with .btn */
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 24px;
    transition: all 0.2s ease-in-out;
    font-family: inherit;
}
button:disabled { /* Less specific disabled state for generic buttons */
    background-color: #a0a0a0;
    cursor: not-allowed;
    color: #fff;
    border-color: transparent;
    transform: none;
    box-shadow: none;
}

/* --- Button Group --- */
.button-group {
    display: flex;
    gap: 10px;
    justify-content: center; /* Consolidated */
    margin-top: 15px;
}
.button-group .btn {
    flex-grow: 1;
    min-width: 120px;
}

/* --- Call to Action Button (specific use case) --- */
.cta-button { 
    display: block; 
    text-align: center; 
    background-color: var(--primary-color); 
    color: #fff !important; 
    padding: 20px; 
    font-size: 1.2rem; 
    font-weight: bold; 
    border-radius: var(--border-radius); 
    margin-top: 20px; 
}
.cta-button:hover { 
    background-color: var(--primary-color-dark); 
}

/* --- Form Controls (Input, Select, Textarea) --- */
.form-group {
    margin-bottom: 20px;
}
.form-group label, label { /* Consolidated label styles */
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-color-light);
}
.form-control, input, select, textarea { /* Consolidated general input styles, .form-control is primary */
    width: 100%; /* Default width for form controls */
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-sizing: border-box;
    font-family: inherit;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-control:focus, input:focus, select:focus, textarea:focus { /* Consolidated focus styles */
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 20%, transparent);
    outline: none;
}
textarea.form-control, textarea { /* Consolidated textarea specific styles */
    resize: vertical;
    min-height: 100px;
}
select.form-control { /* Select-specific styling for appearance */
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath d='M7 10l5 5 5-5H7z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 30px;
}
select.form-control::-ms-expand { display: none; } /* For IE */

/* --- Specific Form Input Overrides --- */
#is_published {
    width:15px;
}
.w30 {
    width: 30px !important;
}
.tox-tinymce {
    min-height:500px;
}

/* --- Header --- */
.main-header {
    background-color: var(--surface-color);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px; /* Specific padding for header container */
}
.main-header .logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-color);
}
.main-header .logo-container img {
    height: 30px;
    margin-left: 10px;
    vertical-align: middle;
}
.main-header .logo-text, .logo { 
    font-size: 1.5rem;
    font-weight: 800;
}

html.dark-mode-html .main-header {
    border-bottom: 1px solid var(--border-color);
}

.main-nav ul { 
    list-style: none; 
    display: flex;
    gap: 30px; 
    align-items: center; 
}
.main-nav a {
    font-weight: 600;
    color: var(--text-color-light);
    padding: 5px 0;
    text-decoration: none;
}
.main-nav a.active {
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}
.main-nav a:hover {
    color: var(--primary-color);
}

.hamburger-menu {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative; 
    padding-bottom: 15px; 
    margin-bottom: -15px;
}
.user-profile .profile-name { 
    font-weight: bold; 
    color: var(--text-color); 
}
.user-profile .profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
}
.user-profile .dropdown-menu {
    display: none; 
    position: absolute;
    top: 55px; 
    right: 0; 
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    width: 180px;
    z-index: 1001; 
    text-align: right; 
}
.user-profile:hover .dropdown-menu { 
    display: block; 
}
.user-profile .dropdown-menu li a {
    display: block;
    padding: 10px 20px;
    color: var(--text-color-light);
    font-weight: normal;
    text-decoration: none;
}
.user-profile .dropdown-menu li a:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}
.user-profile .dropdown-menu .divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 0;
}

.theme-switcher {
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    padding: 12px 24px;
    transition: all 0.2s ease-in-out;
    font-family: inherit;
}

.main-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    padding-top: 60px;
    text-align: center;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}
.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #fff;
}
.footer-col ul {
    list-style: none;
}
.footer-col li {
    margin-bottom: 10px;
}
.footer-col a {
    color: #bdc3c7;
}
.footer-col a:hover {
    color: #fff;
}
.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid #34495e;
}

/* --- Dark Mode Footer Overrides --- */
html.dark-mode-html .footer-bottom {
    border-top-color: #34495e; /* Same value, but explicitly defined in dark mode block */
}

/* --- Hero Section (Landing Page) --- */
.hero {
    background: linear-gradient(135deg, #e0f7fa 0%, #fce4ec 100%);
    padding: 120px 0; /* Final consolidated padding */
    text-align: center;
}
.hero h1 {
    font-size: 3.5rem;
    background: linear-gradient(90deg, var(--primary-color), #2c3e50); /* Unique text gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}
.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 30px auto;
}

/* --- Dark Mode Hero Overrides --- */
html.dark-mode-html .hero {
    background: linear-gradient(135deg, #1a2327 0%, #2c1d2e 100%);
}

/* --- How It Works Section (Landing Page) --- */
.how-it-works {
    background-color: var(--surface-color);
}
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
    margin-top: 40px; /* Consolidated */
}
.step-card {
    padding: 30px;
}
.step-icon {
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
    fill: var(--primary-color);
}

/* --- Features Section (Landing Page) --- */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: flex-start; /* Consolidated value */
}
.feature {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}
.feature-icon {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    fill: var(--secondary-color);
}

/* --- Software Section (Landing Page / Product Page) --- */
.software-section {
    background-color: var(--surface-color);
    padding: 80px 0;
    border-radius: var(--border-radius);
    margin-top: 50px;
}
.software-content {
    display: grid;
    grid-template-columns: 1fr; /* Default to single column for mobile */
    gap: 40px;
    align-items: center;
}
.software-image img {
    max-width: 50%; /* Final value from multiple definitions */
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow);
    float:right; /* Added later, kept */
}
.software-features ul {
    list-style: none;
    padding: 0;
}
.software-features li {
    margin-bottom: 10px;
    padding-left: 30px;
    position: relative;
    color: var(--text-color-light);
}
.software-features li::before {
    content: "âœ“"; /* Changed from "Ã¢Å“â€œ" which is the HTML entity */
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
    color: var(--primary-color);
}
.download-link {
    display: inline-block;
    padding: 15px 30px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: bold;
    margin-top: 20px;
    transition: background-color 0.3s;
    text-align: center;
    width: 100%; /* Full width on mobile by default */
}
.download-link:hover {
    background-color: var(--primary-color-dark);
}

/* --- Call to Action Section (General) --- */
.cta-section {
    background: var(--primary-color);
    color: #fff;
    padding: 60px; /* Consolidated padding, original was 60px 0 in one place */
    text-align: center;
    border-radius: var(--border-radius);
}
.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #fff; /* Specific color for CTA section headings */
}
.cta-section .btn {
    background-color: #fff;
    color: var(--primary-color);
}
.cta-section .btn:hover {
    background-color: #f0f0f0;
}

/* --- Pricing Page Specific Styles --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Consolidated minmax */
    gap: 30px;
    align-items: stretch;
}
.plan-card { 
    background: var(--surface-color); 
    border-radius: var(--border-radius); 
    box-shadow: var(--shadow); 
    padding: 30px; /* Consolidated padding */
    text-align: center; 
    border-top: 5px solid transparent; 
    transition: transform 0.3s, box-shadow 0.3s; 
    display: flex; /* Added for consistent height */
    flex-direction: column; /* Added for consistent height */
    height: 100%; /* Added for consistent height */
}
.plan-card:hover { 
    transform: translateY(-10px); 
}
.plan-card.popular { 
    border-color: var(--secondary-color); 
}
.plan-price { 
    font-size: 2.5rem; /* Final value from multiple definitions */
    font-weight: 800; 
    color: var(--primary-color); 
    margin-bottom: 10px; /* Consolidated */
}
.plan-features { 
    list-style: none; 
    margin: 30px 0; 
    padding: 0; /* Consolidated */
    flex-grow: 1; /* Added for consistent height */
}
.plan-features li { 
    padding: 10px 0; 
    border-bottom: 1px solid var(--border-color); 
}
.plan-features li:last-child {
    border-bottom: none;
}

/* --- Software Card (Pricing Page specific) --- */
.software-card {
    text-align: left;
    padding: 30px;
    border-radius: 16px;
    grid-column: 1 / -1; /* Take full width */
    background: linear-gradient(135deg, #f0f8ff, #e6f0ff);
    color: #333;
}
html.dark-mode-html .software-card {
    /* background: linear-gradient(135deg, #1e2532, #2a203a); */
    color: var(--text-color);
    /* text-align: center; */
}
.software-card img {
    max-width: 300px;
    height: auto;
    border-radius: 12px;
    margin: 0 auto 20px auto;
    display: block;
}
.software-card .plan-price {
    text-align: center;
    margin-bottom: 20px;
    font-size: 2rem;
    font-weight: bold;
}
.software-card .plan-features {
    text-align: center;
}
.software-card .plan-features li {
    margin-bottom: 8px;
}
.software-card .summary {
    font-style: italic;
    color: var(--text-color-light);
    margin-bottom: 20px;
}

/* --- Guide Section --- */
.guide-section {
    padding: 80px 0;
    background-color: var(--background-color);
}
.guide-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 40px;
    line-height: 1.8;
    color: var(--text-color);
}
.guide-container h2 {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: var(--text-color);
}
.guide-container h3 {
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.8rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}
.guide-container p {
    margin-bottom: 15px;
    color: var(--text-color-light);
}
.guide-container ol {
    list-style: decimal; 
    margin-bottom: 25px;
    padding-left: 25px;
    color: var(--text-color-light);
}
.guide-container li {
    margin-bottom: 15px;
}
.guide-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    display: block; 
    margin-left: auto;
    margin-right: auto;
}
.guide-container .note {
    background-color: #fff3cd; /* Ø±Ù†Ú¯ Ø²Ø±Ø¯ Ø±ÙˆØ´Ù† */
    color: #664d03;
    border-left: 5px solid #ffc107;
    padding: 15px;
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
}
html.dark-mode-html .guide-container .note {
    background-color: #3f320b;
    color: #ffda6a;
    border-left-color: #ffc107;
}
.code-block {
    background-color: #eee;
    padding: 15px;
    border-radius: 8px;
    font-family: monospace;
    overflow-x: auto; /* Ø¨Ø±Ø§ÛŒ Ú©Ø¯Ù‡Ø§ÛŒ Ø·ÙˆÙ„Ø§Ù†ÛŒ */
    margin: 15px 0;
    font-size: 0.9em;
    color: #333;
}
html.dark-mode-html .code-block {
    background-color: #2a2a2a;
    color: #eee;
}

/* --- Dashboard Section --- */
.dashboard-grid { 
    display: grid; 
    grid-template-columns: 2fr 1fr; /* Default desktop layout */
    gap: 30px; 
}
.main-column, .sidebar-column { 
    display: flex; 
    flex-direction: column; 
    gap: 30px; 
}
.dashboard-card { 
    background-color: var(--surface-color); 
    padding: 30px; 
    border-radius: var(--border-radius); 
    box-shadow: var(--shadow); 
}
.dashboard-card h3 { 
    border-bottom: 1px solid var(--border-color); 
    padding-bottom: 15px; 
    margin-bottom: 20px; 
}
.api-key-list { 
    list-style: none; 
    padding: 0; 
}
.api-key-item { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 15px; 
    border-radius: 8px; 
    margin-bottom: 10px; 
    background-color: var(--background-color); 
}
.api-key-name { 
    font-weight: bold; 
}
.delete-key-btn { 
    background: none; 
    border: none; 
    color: var(--error-color); 
    cursor: pointer; 
    font-size: 1.2rem; 
}
.usage-bar-container { 
    width: 100%; 
    background-color: #e9ecef; 
    border-radius: 50px; 
    height: 25px; 
    overflow: hidden; 
    margin-top: 10px; 
}
html.dark-mode-html .usage-bar-container { 
    background-color: #2d3748; 
}

/* --- Form Container (General, like login/signup) --- */
.form-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 40px;
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}
.contact-form { /* More specific form style */
    padding: 30px; 
    background: var(--surface-color); 
    border-radius: var(--border-radius); 
    max-width: 700px; 
    margin: auto; 
}

/* --- Alert Messages (General & Admin) --- */
.alert-message {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    margin-bottom: 20px;
    border: 1px solid transparent;
}
.alert-success { 
    background-color: #d4edda; 
    color: #155724; 
    border-color: #c3e6cb; 
}
.alert-error { 
    background-color: #f8d7da; 
    color: #721c24; 
    border-color: #f5c6cb; 
}
.alert-info { 
    background-color: #cce5ff; 
    color: #004085; 
    border-color: #b8daff; 
}

/* --- Dark Mode Alert Messages --- */
html.dark-mode-html .alert-success { 
    background-color: #1a4f21; 
    color: #87e090; 
    border-color: #276b32; 
}
html.dark-mode-html .alert-error { 
    background-color: #6a1a20; 
    color: #e0878e; 
    border-color: #8a2a32; 
}
html.dark-mode-html .alert-info { 
    background-color: #1a2a4f; 
    color: #879ce0; 
    border-color: #273b6b; 
}

/* --- Admin Panel General Styles --- */
body.admin-body { 
    background-color: #f4f7f9; 
}
html.dark-mode-html body.admin-body {
    background-color: #1a202c;
}
.admin-panel {
    max-width: 1200px;
    margin: 20px auto;
}
.admin-nav { 
    background: #343a40; 
    padding: 15px 25px; 
    border-radius: 8px; 
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.admin-nav .nav-links {
    display: flex;
    gap: 25px;
}
.admin-nav a { 
    color: white; 
    text-decoration: none; 
    font-weight: bold;
    transition: color 0.2s;
}
.admin-nav a:hover {
    color: var(--secondary-color);
}
.admin-nav .site-links a {
    font-weight: normal;
}
.content-card { 
    background: var(--surface-color); 
    padding: 30px; 
    border-radius: 8px; 
    box-shadow: var(--shadow);
    min-height: 80vh; 
}

/* --- Admin Panel Tables --- */
table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-top: 20px; 
}
th, td { 
    padding: 12px 15px; 
    text-align: right; 
    border-bottom: 1px solid var(--border-color); 
}
th { 
    background-color: var(--surface-color); 
    font-weight: 600; 
    color: var(--text-color-light); 
}
tr:nth-child(even) { 
    background-color: var(--background-color); 
}
html.dark-mode-html th {
    background-color: #2d3748;
}
html.dark-mode-html tr:nth-child(even) {
    background-color: #2a2a2a;
}
.status-badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: bold;
    color: #fff;
}
.status-success, .status-active { background-color: #28a745; }
.status-failed, .status-cancelled { background-color: #dc3545; }
.status-pending, .status-open { background-color: #ffc107; color: #333; }
.status-answered { background-color: var(--secondary-color); color: #fff; }
.status-expired { background-color: #6c757d; color: #fff; }

/* --- Admin Forms (Settings, Plans, User Edit) --- */
.form-card {
    background-color: var(--surface-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px; 
}
html.dark-mode-html .form-card {
    background-color: #2d3748;
}
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    align-items: end; 
}

/* --- Admin Settings Page Tabs --- */
.nav-tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}
html.dark-mode-html .nav-tabs {
    border-bottom-color: #444;
}
.nav-link {
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-color-light);
    font-weight: 600;
    border: 1px solid transparent;
    border-bottom: none;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    margin-bottom: -1px; 
    transition: background-color 0.2s, color 0.2s;
}
.nav-link:hover {
    background-color: var(--background-color);
    color: var(--primary-color);
}
.nav-link.active {
    background-color: var(--surface-color);
    border-color: #ddd;
    border-bottom-color: var(--surface-color);
    color: var(--primary-color);
}
html.dark-mode-html .nav-link:hover {
    background-color: #1a202c;
}
html.dark-mode-html .nav-link.active {
    background-color: #2d3748;
    border-color: #4a5568;
    border-bottom-color: #2d3748;
}

@media (max-width: 992px) { 
    .dashboard-grid { 
        grid-template-columns: 1fr; 
    }
    .software-content {
        grid-template-columns: 1fr;
    }
    .software-image img {
        max-width: 100%;
        float: none;
    }
    .download-link {
        width: 100%;
    }
}
@media (min-width: 992px) { 
    .software-content {
        grid-template-columns: 1fr 1fr; 
        text-align: left;
    }
    .software-image img {
        width: auto; 
    }
    .download-link {
        width: auto; 
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none; 
        position: absolute;
        top: 70px; 
        left: 0;
        width: 100%;
        background-color: var(--surface-color);
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        border-top: 1px solid var(--border-color);
        padding: 20px 0;
        flex-direction: column; 
        align-items: center;
        transition: transform 0.3s ease-out;
        transform: translateY(-100%); 
    }
    .main-nav.active {
        display: flex; 
        transform: translateY(0);
    }
    .main-nav ul {
        flex-direction: column; 
        width: 100%;
        gap: 0;
    }
    .main-nav ul li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--border-color);
    }
    .main-nav ul li:last-child {
        border-bottom: none;
    }
    .main-nav ul li a {
        padding: 15px 0;
        display: block;
    }
    .hamburger-menu {
        display: block; 
    }

    h1 { font-size: 2.5rem !important; }
    h2 { font-size: 2rem; }
    .features-grid { grid-template-columns: 1fr; }

    .admin-panel {
        margin: 10px auto;
        padding: 0 10px;
    }
    .admin-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px;
    }
    .admin-nav .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 5px;
    }
    .admin-nav .site-links {
        margin-top: 10px;
        width: 100%;
        display: flex;
        justify-content: space-around;
    }
    .settings-container, .plans-container, .edit-user-grid, .dashboard-grid { 
        grid-template-columns: 1fr; 
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .button-group .btn {
        width: 100%; 
        flex-grow: 0;
    }
    .main-header .container{
        width:100%;
    }
    .logo-text{
       display:none 
    }
    .user-profile .dropdown-menu{
        right:-70px
    }
}