* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1a56db;
    --primary-dark: #1340a0;
    --primary-light: #e8effc;
    --success: #059669;
    --success-light: #d1fae5;
    --danger: #dc2626;
    --danger-light: #fee2e2;
    --warning: #d97706;
    --warning-light: #fef3c7;
    --dark: #111827;
    --gray-900: #1f2937;
    --gray-700: #374151;
    --gray-500: #6b7280;
    --gray-300: #d1d5db;
    --gray-100: #f3f4f6;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --radius: 0.5rem;
    --radius-lg: 0.75rem;
    --bg: var(--gray-100);
    --card-bg: var(--white);
    --text: var(--gray-900);
    --text-secondary: var(--gray-500);
    --border: #e5e7eb;
    --navbar-bg: var(--white);
    --footer-bg: var(--gray-900);
    --footer-text: #9ca3af;
}

[data-theme="dark"] {
    --primary: #60a5fa;
    --primary-dark: #3b82f6;
    --primary-light: #1e3a5f;
    --success: #34d399;
    --success-light: #064e3b;
    --danger: #f87171;
    --danger-light: #7f1d1d;
    --warning: #fbbf24;
    --warning-light: #78350f;
    --dark: #f9fafb;
    --gray-900: #f3f4f6;
    --gray-700: #d1d5db;
    --gray-500: #9ca3af;
    --gray-300: #4b5563;
    --gray-100: #1f2937;
    --white: #111827;
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text: #f1f5f9;
    --text-secondary: #94a3b8;
    --border: #334155;
    --navbar-bg: #1e293b;
    --footer-bg: #0f172a;
    --footer-text: #64748b;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.3), 0 2px 4px -2px rgba(0,0,0,0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.3), 0 4px 6px -4px rgba(0,0,0,0.2);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    transition: background 0.3s, color 0.3s;
}

/* ============= NOTIFICATIONS ============= */

.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
}

.notification {
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    animation: notifIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification.success { background: var(--success-light); color: #065f46; border: 1px solid #a7f3d0; }
.notification.error { background: var(--danger-light); color: #991b1b; border: 1px solid #fca5a5; }
.notification.warning { background: var(--warning-light); color: #92400e; border: 1px solid #fde68a; }
.notification.info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }

@keyframes notifIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* ============= NAVBAR ============= */

.navbar {
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
}

[data-theme="dark"] .navbar {
    background: rgba(30, 41, 59, 0.85);
}

.nav-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 68px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1.5rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    flex-shrink: 0;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    flex-shrink: 0;
}

.logo-text {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
}

.logo-highlight { color: var(--primary); }

.nav-links {
    display: flex;
    gap: 0.2rem;
    flex: 1;
    justify-content: center;
}

.nav-link {
    text-decoration: none;
    color: var(--gray-500);
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.45rem 0.8rem;
    border-radius: 8px;
    transition: all 0.2s;
    position: relative;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
    transition: transform 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: translateX(-50%) scaleX(1);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
}

.btn-icon-only {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-family: inherit;
    line-height: 1;
}

.btn-icon-only:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: scale(1.05);
}

.btn-login {
    padding: 0.45rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    border: 1.5px solid var(--gray-300);
    color: var(--gray-700);
    font-family: inherit;
}

.btn-login:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
    transform: translateY(-1px);
}

.btn-register {
    padding: 0.45rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--primary);
    border: 1.5px solid var(--primary);
    color: var(--white);
    font-family: inherit;
    box-shadow: 0 2px 8px rgba(26, 86, 219, 0.2);
}

.btn-register:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.3);
}

/* Hamburger menu button */
.nav-toggle {
    display: none;
    width: 38px;
    height: 38px;
    border: none;
    background: transparent;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 6px;
    border-radius: 8px;
    transition: background 0.2s;
}

.nav-toggle:hover { background: var(--gray-100); }

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all 0.3s ease;
}

.nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* User info */
.user-info {
    position: relative;
    display: flex;
    align-items: center;
}

.user-info-trigger {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 8px;
    transition: background 0.15s;
    user-select: none;
}

.user-info-trigger:hover {
    background: var(--gray-100);
}

.user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gray-900);
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-plan {
    padding: 0.15rem 0.5rem;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 600;
    white-space: nowrap;
}

.user-counter {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.user-arrow {
    font-size: 0.55rem;
    color: var(--gray-400);
    transition: transform 0.2s;
}

.user-mini-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 0.3rem);
    right: 0;
    min-width: 180px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    z-index: 1100;
    overflow: hidden;
    padding: 0.4rem;
}

.user-mini-dropdown.dropdown-open {
    display: block;
    animation: ddFadeIn 0.15s ease;
}

@keyframes ddFadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

.mini-dd-item {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: none;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-900);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    text-decoration: none;
    transition: background 0.12s;
}

.mini-dd-item:hover {
    background: var(--gray-100);
}

.mini-dd-logout {
    color: var(--danger);
    border-top: 1px solid var(--border);
    margin-top: 0.2rem;
    padding-top: 0.6rem;
    border-radius: 0;
}

.mini-dd-logout:hover {
    background: var(--danger-light);
    color: var(--danger);
}

/* Nav helper links */
.nav-helper-links {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.nav-helper-link {
    font-size: 0.72rem;
    color: var(--gray-500);
    text-decoration: none;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
}

.nav-helper-link:hover {
    color: var(--primary);
    background: var(--primary-light);
}

/* ============= NAVBAR RESPONSIVE ============= */

@media (max-width: 1024px) {
    .nav-links {
        gap: 0;
    }
    .nav-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .nav-container {
        padding: 0 1rem;
        height: 60px;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--navbar-bg);
        -webkit-backdrop-filter: blur(12px);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        padding: 0.5rem;
        gap: 0.25rem;
        box-shadow: var(--shadow-lg);
        z-index: 999;
        animation: slideDown 0.2s ease;
    }

    [data-theme="dark"] .nav-links {
        background: rgba(30, 41, 59, 0.95);
    }

    .nav-links.open { display: flex; }

    @keyframes slideDown {
        from { opacity: 0; transform: translateY(-8px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .nav-link {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
        width: 100%;
    }

    .nav-link::after { display: none; }

    .nav-actions {
        gap: 0.4rem;
    }

    .btn-login,
    .btn-register {
        padding: 0.4rem 0.9rem;
        font-size: 0.8rem;
    }

    .btn-icon-only {
        width: 34px;
        height: 34px;
        font-size: 1rem;
    }

    .user-name {
        max-width: 80px;
        font-size: 0.8rem;
    }

    .user-plan {
        font-size: 0.6rem;
        padding: 0.1rem 0.4rem;
    }

    .nav-helper-links {
        display: none;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.75rem;
        height: 56px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .logo-icon {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .btn-login,
    .btn-register {
        padding: 0.35rem 0.75rem;
        font-size: 0.75rem;
    }

    .btn-icon-only {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .nav-links {
        top: 56px;
    }

    .user-name { max-width: 60px; }
}

/* ============= ACCOUNT PAGE (mi-cuenta.html) ============= */

.account-page {
    display: flex;
    min-height: calc(100vh - 56px);
    background: var(--bg);
}

.account-sidebar {
    width: 220px;
    flex-shrink: 0;
    background: var(--card-bg);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem 0;
}

.account-nav {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0 0.5rem;
}

.account-nav-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 0.75rem;
    background: none;
    border: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: all 0.12s;
}

.account-nav-item:hover {
    background: var(--gray-100);
    color: var(--gray-900);
}

.account-nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.ani-icon {
    font-size: 1rem;
    width: 1.3rem;
    text-align: center;
}

.account-sidebar-footer {
    padding: 0 0.5rem;
}

.account-logout {
    display: block;
    width: 100%;
    padding: 0.6rem 0.75rem;
    background: none;
    border: 1px solid var(--danger);
    border-radius: var(--radius);
    color: var(--danger);
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.12s;
    text-align: center;
}

.account-logout:hover {
    background: var(--danger);
    color: var(--white);
}

.account-content {
    flex: 1;
    padding: 2rem 2.5rem;
    overflow-y: auto;
    max-width: 680px;
}

.account-panel {
    display: none;
}

.account-panel.active {
    display: block;
}

.account-panel-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary);
}

.account-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 400px;
}

/* Drawer forms (also used by account page) */
.drawer-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.df-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.df-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-700);
}

.df-input {
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background: var(--white);
    color: var(--gray-900);
    font-family: inherit;
    transition: border-color 0.12s;
}

.df-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px var(--primary-light);
}

.df-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.df-submit {
    padding: 0.65rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.12s;
}

.df-submit:hover { background: var(--primary-dark); }

/* Plan info card */
.plan-info-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
}

.pi-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border);
}

.pi-row:last-child { border-bottom: none; }

.pi-label {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.pi-value {
    font-size: 0.9rem;
    color: var(--gray-900);
    text-align: right;
}

/* Preferences */
.pref-section {
    margin-bottom: 1.5rem;
}

.pref-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
}

.pref-lang-options {
    display: flex;
    gap: 0.5rem;
}

.pref-lang-option {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--gray-700);
    transition: all 0.12s;
    user-select: none;
}

.pref-lang-option input { display: none; }

.pref-lang-option.pref-active {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

.pref-toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.75rem;
    padding: 0.7rem 0;
    cursor: pointer;
    border-bottom: 1px solid var(--border);
    user-select: none;
}

.pref-toggle input[type="checkbox"] {
    width: 1.1rem;
    height: 1.1rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.pref-toggle-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--gray-900);
}

.pref-toggle-desc {
    width: 100%;
    font-size: 0.78rem;
    color: var(--gray-500);
    padding-left: 1.85rem;
}

/* ============= STATUS BAR ============= */

.status-bar {
    background: var(--gray-900);
    color: #9ca3af;
    font-size: 0.75rem;
    padding: 0.3rem 2rem;
    border-bottom: 1px solid var(--gray-700);
}

.status-bar-inner {
    max-width: 1280px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.status-item strong { color: #e5e7eb; font-weight: 600; }
.status-divider { color: #4b5563; font-size: 0.65rem; }
.status-ok { color: #34d399 !important; }
.status-warn { color: #fbbf24 !important; }
.status-err { color: #f87171 !important; }

.status-pulse {
    animation: statusPulse 1s ease-out;
}

@keyframes statusPulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; background: rgba(52, 211, 153, 0.15); border-radius: 4px; }
    100% { opacity: 1; }
}

.status-change {
    font-size: 0.7rem;
    margin-left: 2px;
    font-weight: 700;
}
.status-change-up { color: #34d399; }
.status-change-down { color: #f87171; }
.status-change-same { color: #6b7280; }

/* ============= HERO ============= */

.hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #0f1f3a 100%);
    padding: 3.5rem 2rem;
    text-align: center;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.highlight { color: #60a5fa; }

.hero-content p {
    color: #93a8c9;
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
}

.stat { text-align: center; }

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: #60a5fa;
}

.stat-label {
    font-size: 0.8rem;
    color: #93a8c9;
    margin-top: 0.15rem;
}

/* ============= CONVERTER SECTION ============= */

.converter-section {
    padding: 2rem 2rem 4rem;
}

.container {
    max-width: 880px;
    margin: 0 auto;
}

.converter-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

.converter-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.subtitle {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ============= USAGE BANNER ============= */

.usage-banner {
    padding: 0.6rem 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.usage-banner--ok {
    background: var(--success-light);
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.usage-banner--low {
    background: var(--warning-light);
    color: #92400e;
    border: 1px solid #fde68a;
}

.usage-banner--exhausted {
    background: var(--danger-light);
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ============= DROP ZONE ============= */

.drop-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    cursor: pointer;
    background: var(--card-bg);
    transition: all 0.15s;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: var(--primary);
    background: var(--primary-light);
}

.drop-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 0.75rem;
    opacity: 0.6;
}

.drop-zone p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.browse-link {
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
}

/* ============= FILES LIST ============= */

.files-list {
    margin: 1.25rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.files-header {
    padding: 0.75rem 1rem;
    background: var(--gray-100);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.file-item {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.1s;
}

.file-item:last-child { border-bottom: none; }
.file-item:hover { background: var(--gray-100); }

.file-name {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--gray-900);
}

.file-size {
    color: var(--gray-500);
    font-size: 0.8rem;
}

.file-remove {
    color: var(--danger);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius);
    transition: background 0.1s;
}

.file-remove:hover {
    background: var(--danger-light);
}

/* ============= SETTINGS ============= */

.settings-panel {
    margin: 1.25rem 0;
    padding: 1.25rem;
    background: var(--gray-100);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    transition: background 0.3s, border-color 0.3s;
}

.settings-panel h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}



.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.5rem;
}

.setting-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.4rem 0.5rem;
    border-radius: var(--radius);
    transition: background 0.1s;
    font-size: 0.85rem;
    color: var(--gray-700);
}

    .setting-item:hover { background: var(--card-bg); }
    .setting-item input[type="checkbox"] { accent-color: var(--primary); }

/* ============= BUTTONS ============= */

.action-buttons {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.btn-primary,
.btn-secondary {
    padding: 0.65rem 1.25rem;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.15s;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    flex: 1;
    justify-content: center;
}

.btn-primary:hover:not(:disabled) { background: var(--primary-dark); }
.btn-primary:disabled { opacity: 0.4; cursor: not-allowed; }

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover { background: var(--gray-100); border-color: var(--gray-500); }

/* ============= PROGRESS ============= */

.progress-section {
    margin-top: 1.5rem;
}

    .progress-bar {
    height: 0.5rem;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
    border-radius: 999px;
}

.progress-text {
    margin-top: 0.5rem;
    text-align: center;
    color: var(--gray-500);
    font-size: 0.85rem;
}

/* ============= RESULTS ============= */

    .results-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.results-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.result-item {
    padding: 0.75rem 1rem;
    background: var(--success-light);
    border: 1px solid #a7f3d0;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.result-item strong { color: #065f46; }
.result-item small { color: #047857; }

.btn-download {
    background: var(--success);
    color: var(--white);
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.btn-download:hover { background: #059669; }

.btn-compare {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.8rem;
    font-family: inherit;
    transition: all 0.15s;
}

.btn-compare:hover {
    background: var(--white);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-download-all {
    margin-top: 0.75rem;
    width: 100%;
    padding: 0.65rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.btn-download-all:hover { background: var(--primary-dark); }

/* ============= PREVIEW ============= */

    .preview-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.preview-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.preview-info {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Comparison Slider */
.comparison-container {
    width: 100%;
    max-width: 700px;
    margin: 0.75rem auto 0.75rem;
}

.comparison-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius);
    user-select: none;
    cursor: ew-resize;
    background: var(--gray-100);
    min-height: 200px;
}

.comparison-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comparison-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.comparison-processed { clip-path: inset(0 50% 0 0); }

.comparison-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    z-index: 10;
    transform: translateX(-50%);
    cursor: ew-resize;
    display: flex;
    align-items: center;
    justify-content: center;
}

.comp-handle-line {
    width: 2px;
    height: 100%;
    background: white;
    box-shadow: 0 0 6px rgba(0,0,0,0.3);
}

.comp-handle-circle {
    position: absolute;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1px;
    cursor: ew-resize;
    z-index: 11;
}

.comp-arrow {
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
}

.comp-arrow-left { color: var(--primary); }
.comp-arrow-right { color: var(--success); }

.comparison-labels {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0;
    font-size: 0.75rem;
    font-weight: 600;
}

.comp-label-left { color: var(--primary); }
.comp-label-right { color: var(--success); }

#previewCloseBtn { margin-top: 0.75rem; }

/* ============= PLANS ============= */

.plans-section {
    padding: 5rem 2rem;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    border-top: 1px solid #e5e7eb;
}

[data-theme="dark"] .plans-section {
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
}

.plans-section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--dark);
    letter-spacing: -0.02em;
}

.plans-section .section-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 3rem;
    font-size: 1.05rem;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto;
    align-items: stretch;
}

/* ===== Plan Card - Flip Container ===== */
.plan-card {
    perspective: 1200px;
    position: relative;
}

.plan-card-inner {
    position: relative;
    width: 100%;
    min-height: 1100px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 20px;
}

.plan-card.flipped .plan-card-inner {
    transform: rotateY(180deg);
}

.plan-card-front,
.plan-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 20px;
    background: var(--white);
    overflow: hidden;
}

[data-theme="dark"] .plan-card-front,
[data-theme="dark"] .plan-card-back {
    background: #1e293b;
}

.plan-card-front {
    z-index: 2;
}

.plan-card-back {
    transform: rotateY(180deg);
    z-index: 1;
    overflow-y: auto;
}

/* ===== Both Faces Common ===== */
.plan-card-front,
.plan-card-back {
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    transition: box-shadow 0.35s ease;
}

.plan-card:hover .plan-card-front,
.plan-card:hover .plan-card-back {
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

[data-theme="dark"] .plan-card:hover .plan-card-front,
[data-theme="dark"] .plan-card:hover .plan-card-back {
    box-shadow: 0 12px 40px rgba(0,0,0,0.3);
}

/* Popular border on front/back */
.plan-card.popular .plan-card-front,
.plan-card.popular .plan-card-back {
    border: 2px solid var(--primary);
    box-shadow: 0 0 0 1px var(--primary), 0 8px 32px rgba(26, 86, 219, 0.12);
}

[data-theme="dark"] .plan-card.popular .plan-card-front,
[data-theme="dark"] .plan-card.popular .plan-card-back {
    box-shadow: 0 0 0 1px #3b82f6, 0 8px 32px rgba(96, 165, 250, 0.15);
}

/* Current plan border */
.plan-card.current-plan .plan-card-front,
.plan-card.current-plan .plan-card-back {
    border: 2px solid var(--success);
}

/* ===== Popular Badge (shared) ===== */
.plan-popular-badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: var(--white);
    padding: 0.4rem 1.5rem;
    border-radius: 0 0 14px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.25);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.plan-popular-badge.back {
    z-index: 20;
}

[data-theme="dark"] .plan-popular-badge {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Current plan badge (shared) */
.plan-card.current-plan::before {
    content: '✓ Plan activo';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--success);
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 999px;
    font-size: 0.6rem;
    font-weight: 700;
    white-space: nowrap;
    z-index: 15;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

/* ===== Header (both faces) ===== */
.plan-header {
    text-align: center;
    padding: 1.75rem 2rem 1rem;
    position: relative;
}

.plan-name {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--dark);
    letter-spacing: -0.01em;
}

.plan-desc {
    font-size: 0.95rem;
    color: var(--gray-500);
    margin-top: 0.3rem;
    line-height: 1.45;
}

/* ===== Body ===== */
.plan-body {
    flex: 1;
    padding: 0 1.75rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

/* ===== Option Card ===== */
.plan-option {
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    padding: 1.25rem;
    transition: all 0.25s ease;
    background: var(--card-bg);
}

[data-theme="dark"] .plan-option {
    background: #0f172a;
    border-color: #334155;
}

.plan-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

[data-theme="dark"] .plan-option:hover {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.05);
}

.plan-option-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.plan-option-period-wrap {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.plan-option-period {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

[data-theme="dark"] .plan-option-period { color: #cbd5e1; }

.plan-option-period-sub {
    font-size: 0.72rem;
    color: var(--gray-400);
    font-weight: 500;
}

.plan-option-price-wrap {
    text-align: right;
    flex-shrink: 0;
}

.plan-option-price {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    display: block;
}

.plan-option-price small {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--gray-400);
}

.plan-option-savings {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--success);
    display: block;
    margin-top: 0.25rem;
}

/* ===== Features ===== */
.plan-option-features {
    list-style: none;
    margin: 0;
}

.plan-option-features li {
    padding: 0.4rem 0;
    font-size: 0.88rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.4;
}

[data-theme="dark"] .plan-option-features li { color: #94a3b8; }

.plan-option-features li::before {
    content: "";
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--success);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='white'%3E%3Cpath d='M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z'/%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

/* ===== Badges ===== */
.plan-option-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin: 0.6rem 0 0.7rem;
}

.plan-option-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #059669;
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}

[data-theme="dark"] .plan-option-badge {
    background: linear-gradient(135deg, #064e3b, #065f46);
    color: #6ee7b7;
    border-color: #065f46;
}

/* ===== Buttons ===== */
.plan-option-btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--primary), #4f46e5);
    color: var(--white);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.plan-option-btn::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.1));
    pointer-events: none;
}

.plan-option-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(26, 86, 219, 0.3);
}

.plan-option-btn:active { transform: translateY(0); }

.plan-option-btn.current-plan-btn {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.plan-option-btn.current-plan-btn::after { display: none; }

.plan-option-btn.current-plan-btn:hover {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.2);
}

.plan-option-btn.plan-free-btn {
    background: linear-gradient(135deg, #10b981, #059669);
}

.plan-option-btn.plan-free-btn:hover {
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.3);
}

.plan-option-btn:disabled {
    opacity: 0.7;
    cursor: default;
    transform: none !important;
    box-shadow: none !important;
}

/* ===== Flip Hint ===== */
.plan-flip-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.6rem;
    margin-top: auto;
    transition: color 0.2s;
    user-select: none;
}

.plan-flip-hint:hover { color: var(--primary); }

.plan-flip-hint .arrow {
    transition: transform 0.3s;
    font-size: 0.9rem;
}

[data-theme="dark"] .plan-flip-hint { color: #64748b; }
[data-theme="dark"] .plan-flip-hint:hover { color: #60a5fa; }

/* ===== Back Face Specifics ===== */
.plan-back-header {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.5rem 1rem;
    gap: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

[data-theme="dark"] .plan-back-header { border-color: #334155; }

.plan-back-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--gray-500);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-weight: 600;
    font-family: inherit;
    flex-shrink: 0;
}

.plan-back-btn:hover {
    background: #f3f4f6;
    color: var(--dark);
}

[data-theme="dark"] .plan-back-btn {
    color: #94a3b8;
}

[data-theme="dark"] .plan-back-btn:hover {
    background: #334155;
    color: #f1f5f9;
}

.plan-back-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--dark);
    flex: 1;
    text-align: center;
}

[data-theme="dark"] .plan-back-title { color: #f1f5f9; }

.plan-back-body {
    flex: 1;
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    overflow-y: auto;
}

/* ===== Popular option inside option ===== */
.plan-option-popular {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary), #6366f1);
    color: white;
    padding: 0.12rem 0.7rem;
    border-radius: 0 0 8px 8px;
    font-size: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.plan-option.popular-option {
    border-color: var(--primary);
    background: var(--primary-light);
}

[data-theme="dark"] .plan-option.popular-option {
    border-color: #3b82f6;
    background: rgba(59, 130, 246, 0.08);
}

.plan-option.popular-option .plan-option-btn {
    background: var(--primary);
}

/* ===== Animations ===== */
.plan-card {
    animation: cardFadeIn 0.5s ease both;
}

.plan-card:nth-child(1) { animation-delay: 0.05s; }
.plan-card:nth-child(2) { animation-delay: 0.1s; }
.plan-card:nth-child(3) { animation-delay: 0.15s; }
.plan-card:nth-child(4) { animation-delay: 0.2s; }

@keyframes cardFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============= SERVICIOS BANNER ============= */

.services-banner {
    padding: 3rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, #0f3a8e 100%);
    border-top: 1px solid #e5e7eb;
}

.services-banner-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    max-width: 1120px;
    margin: 0 auto;
}

.services-banner-text {
    flex: 1;
}

.services-banner-badge {
    display: inline-block;
    padding: 0.25rem 0.8rem;
    background: rgba(255,255,255,0.15);
    color: #ffffff;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.services-banner-text h2 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #ffffff;
}

.services-banner-text p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255,255,255,0.85);
    max-width: 560px;
}

.services-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-banner-primary {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: #ffffff;
    color: var(--primary);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
}

.btn-banner-primary:hover {
    background: #f0f4ff;
    transform: translateY(-1px);
}

.btn-banner-secondary {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    background: transparent;
    color: #ffffff;
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
    font-family: inherit;
    white-space: nowrap;
}

.btn-banner-secondary:hover {
    border-color: #ffffff;
    background: rgba(255,255,255,0.1);
}

/* ============= CONTACTO ============= */

.contact-section {
    padding: 4rem 2rem;
    background: #f8fafc;
    border-top: 1px solid #e5e7eb;
}

.contact-section h2 {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.contact-section .section-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
    align-items: start;
}

.contact-info {
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem 0;
}

.contact-info-item:not(:last-child) {
    border-bottom: 1px solid #f1f5f9;
}

.contact-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.contact-info-item div {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.contact-info-item strong {
    font-size: 0.85rem;
    color: var(--dark);
}

.contact-info-item span,
.contact-info-item a {
    font-size: 0.85rem;
    color: var(--gray-500);
    text-decoration: none;
}

.contact-info-item a:hover {
    color: var(--primary);
}

.contact-form {
    background: var(--white);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid #d1d5db;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-family: inherit;
    background: var(--white);
    color: var(--dark);
    transition: border-color 0.15s;
    box-sizing: border-box;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.1);
}

.contact-form textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-form button {
    padding: 0.65rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
    align-self: flex-start;
}

.contact-form button:hover {
    background: var(--primary-dark);
}

@media (max-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr;
    }
}



/* ============= MODAL ============= */

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--white);
    padding: 2rem;
    width: 90%;
    max-width: 460px;
    border-radius: var(--radius-lg);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--gray-500);
    transition: color 0.15s;
    line-height: 1;
}

.close:hover { color: var(--dark); }

.modal-content h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark);
}

.modal-content form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.modal-content input {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s;
}

.modal-content input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,86,219,0.1);
}

.modal-content button[type="submit"] {
    padding: 0.65rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.modal-content button[type="submit"]:hover { background: var(--primary-dark); }

/* ============= HOW IT WORKS ============= */

.how-it-works-section {
    padding: 4rem 2rem;
    background: var(--white);
}

.section-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.how-it-works-section .section-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.step-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    text-align: center;
    position: relative;
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.step-card:hover {
    box-shadow: var(--shadow-md);
}

.step-number {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
}

.step-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
    margin-top: 0.25rem;
}

.step-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.step-card p {
    color: var(--gray-500);
    font-size: 0.875rem;
    line-height: 1.6;
}

.step-list {
    text-align: left;
    margin-top: 0.75rem;
    list-style: none;
    padding-left: 0;
}

.step-list li {
    padding: 0.2rem 0;
    color: var(--gray-500);
    font-size: 0.85rem;
}

.step-tip {
    margin-top: 0.75rem;
    padding: 0.4rem 0.75rem;
    background: #fef3c7;
    border-radius: var(--radius);
    font-size: 0.8rem;
    color: #92400e;
}

.step-tip.success {
    background: var(--success-light);
    color: #065f46;
}

/* ============= FEATURES ============= */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin: 3rem 0;
}

.feature-card {
    text-align: center;
    padding: 1.5rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid #e5e7eb;
    transition: all 0.2s;
}

.feature-card:hover {
    box-shadow: var(--shadow-md);
}

.feature-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.feature-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.8rem;
    line-height: 1.5;
}

.video-tip {
    font-size: 0.8rem;
    opacity: 0.75;
}

/* ============= SPECS TABLE ============= */

.specs-table {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    margin: 3rem 0;
    border: 1px solid #e5e7eb;
    overflow-x: auto;
}

.specs-table h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark);
}

.specs-table table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table th,
.specs-table td {
    padding: 0.65rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.85rem;
}

.specs-table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
}

.specs-table td { color: var(--gray-500); }
.success-text { color: var(--success); font-weight: 500; }

/* ============= TUTORIAL ============= */

.tutorial-section {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    text-align: center;
    margin: 3rem 0;
    color: var(--white);
}

.tutorial-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.video-container {
    margin-top: 1rem;
}

.video-wrapper {
    position: relative;
    width: 100%;
    border-radius: var(--radius);
    overflow: hidden;
    background: #000;
}

.video-wrapper iframe {
    display: block;
    width: 100%;
    height: auto;
    min-height: 400px;
    border: none;
}

.video-description {
    text-align: center;
    margin-top: 0.75rem;
}

.video-description p {
    margin: 0.35rem 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ============= FAQ ============= */

.faq-section {
    margin-top: 3rem;
}

.faq-section h3 {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: var(--dark);
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1rem;
}

.faq-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.15s;
}

.faq-item:hover {
    border-color: var(--gray-300);
}

.faq-question {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question::after {
    content: "▼";
    font-size: 0.65rem;
    color: var(--gray-500);
    transition: transform 0.2s;
}

.faq-item.active .faq-question::after {
    transform: rotate(180deg);
}

.faq-answer {
    color: var(--gray-500);
    font-size: 0.85rem;
    line-height: 1.5;
    display: none;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.faq-item.active .faq-answer {
    display: block;
}

/* ============= PAYMENT MODAL ============= */

.payment-modal-content {
    max-width: 480px;
}

.payment-plan-details {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin: 1rem 0;
    text-align: center;
}

.payment-plan-price {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.payment-plan-features {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    justify-content: center;
}

.payment-plan-features li {
    font-size: 0.75rem;
    padding: 0.2rem 0.6rem;
    background: #dbeafe;
    color: var(--primary-dark);
    border-radius: 999px;
}

.payment-methods {
    margin: 1.25rem 0;
}

.payment-methods h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.payment-method-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
}

.payment-method:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.payment-method input[type="radio"] { display: none; }

.payment-method input[type="radio"]:checked ~ .pm-radio {
    border-color: var(--primary);
    background: var(--primary);
}

.payment-method input[type="radio"]:checked ~ .pm-radio::after { transform: scale(1); }

.payment-method:has(input:checked) {
    border-color: var(--primary);
    background: var(--primary-light);
}

.pm-radio {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.15s;
}

.pm-radio::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
    transform: scale(0);
    transition: transform 0.15s;
}

.pm-info { flex: 1; display: flex; flex-direction: column; }
.pm-name { font-weight: 600; color: var(--dark); font-size: 0.9rem; }
.pm-desc { font-size: 0.75rem; color: var(--gray-500); }

.pm-logo {
    font-weight: 700;
    font-size: 0.65rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 1px;
}

.paypal-logo {
    background: #003087; color: white;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    font-size: 0.65rem;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    letter-spacing: 1px;
}

.pm-logo-icons { display: flex; gap: 4px; align-items: center; }
.pm-icon {
    font-weight: 700;
    font-size: 0.55rem;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    letter-spacing: 0.5px;
}
.icon-visa { background: #1a1f71; color: white; }
.icon-mastercard { background: linear-gradient(135deg, #eb001b 50%, #f79e1b 50%); color: white; }
.icon-amex { background: #2e77bc; color: white; }

.btn-pay {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}

.btn-pay:hover:not(:disabled) { background: var(--primary-dark); }
.btn-pay:disabled { opacity: 0.5; cursor: not-allowed; }

.payment-secure {
    text-align: center;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.75rem;
}

/* ============= PERIOD SELECTOR ============= */

.payment-period {
    margin: 1rem 0;
}

.payment-period h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--dark);
}

.payment-period-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.period-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.7rem 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    position: relative;
}

.period-option:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.period-option.period-active {
    border-color: var(--primary);
    background: var(--primary-light);
}

.period-option input[type="radio"] { display: none; }

.period-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark);
}

.period-price {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 700;
}

.period-badge {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--success);
    background: var(--success-light);
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    white-space: nowrap;
}

/* ============= CURRENCY FORMAT HELPER ============= */

.plan-price-value { font-weight: 800; }

/* ============= TOOLTIPS ============= */

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--gray-300);
    color: var(--text);
    font-size: 0.7rem;
    font-weight: 700;
    cursor: help;
    flex-shrink: 0;
    position: relative;
    transition: background 0.15s;
}

.tooltip-icon:hover {
    background: var(--primary);
    color: white;
}

.tooltip-icon::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--gray-900);
    color: var(--gray-100);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    font-size: 0.75rem;
    font-weight: 400;
    white-space: normal;
    width: 220px;
    text-align: left;
    line-height: 1.4;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 100;
    box-shadow: var(--shadow-md);
}

.tooltip-icon:hover::after {
    opacity: 1;
}

.setting-label {
    flex: 1;
}

/* ============= LOADING SPINNER ============= */

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin: 1rem auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============= DRAG & DROP REORDER ============= */

.file-item.dragging {
    opacity: 0.4;
    background: var(--primary-light);
}

.file-item.drag-over {
    border-top: 2px solid var(--primary);
}

.file-item .drag-handle {
    cursor: grab;
    color: var(--gray-500);
    font-size: 1rem;
    padding: 0 0.25rem;
    user-select: none;
    flex-shrink: 0;
}

.file-item .drag-handle:active {
    cursor: grabbing;
}

/* ============= HISTORY SECTION ============= */

.history-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.history-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text);
}

.history-item {
    padding: 0.6rem 0.75rem;
    background: var(--gray-100);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
}

.history-item-name {
    font-weight: 500;
    color: var(--text);
}

.history-item-meta {
    color: var(--text-secondary);
    font-size: 0.75rem;
}

.history-item .btn-download {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
}

.history-empty {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    padding: 1rem;
}

/* ============= SITE FOOTER ============= */

.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 2rem 2rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border);
    transition: background 0.3s;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1rem;
    color: var(--gray-100);
}

.footer-tagline {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--footer-text);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-links a {
    color: var(--footer-text);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-copy {
    font-size: 0.8rem;
    line-height: 1.6;
}

.footer-copy small {
    opacity: 0.7;
}

/* ============= SCROLL TO TOP ============= */

.scroll-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s, transform 0.3s, background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.scroll-top.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-top:hover {
    background: var(--primary-dark);
}

/* ============= GLOBAL ERROR OVERLAY ============= */

.global-error-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.global-error-box {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 480px;
    width: 90%;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.global-error-box h3 {
    color: var(--danger);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.global-error-box p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
}

.global-error-box button {
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

/* ============= DARK MODE TRANSITIONS ============= */

.modal,
.modal-content,
.converter-card,
.drop-zone,
.files-list,
.settings-panel,
.file-item,
.result-item,
.plan-card-inner,
.plan-card-front,
.plan-card-back,
.plan-option,
.step-card,
.feature-card,
.specs-table,
.faq-item,
.history-item,
.notification,
.account-sidebar,
.account-nav-item,
.account-content,
.account-panel,
.plan-info-card,
.pref-lang-option,
.pref-toggle {
    transition: background 0.3s, border-color 0.3s, color 0.3s, box-shadow 0.3s;
}

/* ============= RESPONSIVE ============= */

/* Tablet landscape & smaller (up to 1200px) */
@media (max-width: 1200px) {
    .container { padding: 0 1.5rem; }
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 750px;
        gap: 1.5rem;
    }
}

/* Tablet & smaller (up to 1024px) */
@media (max-width: 1024px) {
    .hero-content h1 { font-size: 2.25rem; }
    .hero-content p { font-size: 1rem; }
    .comparison-container { max-width: 100%; }
    .payment-period-options { grid-template-columns: 1fr 1fr; }
    .settings-grid { grid-template-columns: 1fr 1fr; }
}

/* Mobile landscape & smaller (up to 768px) */
@media (max-width: 768px) {
    /* Hero */
    .hero {
        padding: 2.5rem 1rem;
    }
    .hero-content h1 {
        font-size: 1.75rem;
    }
    .hero-content p {
        font-size: 0.9rem;
    }
    .stats {
        flex-direction: column;
        gap: 0.75rem;
    }
    .stat-value { font-size: 1.4rem; }
    .stat-label { font-size: 0.7rem; }

    /* Converter */
    .converter-section {
        padding: 1.5rem 1rem 3rem;
    }
    .converter-card {
        padding: 1.25rem;
    }
    .converter-card h2 { font-size: 1.1rem; }
    .subtitle { font-size: 0.8rem; }
    .drop-zone {
        padding: 1.5rem 1rem;
        min-height: 120px;
    }
    .drop-zone-text { font-size: 0.85rem; }
    .drop-icon { font-size: 2rem; }
    .drop-hint { font-size: 0.7rem; }

    /* Files list */
    .files-header { font-size: 0.8rem; padding: 0.5rem 0.75rem; }
    .file-item { padding: 0.5rem 0.6rem; font-size: 0.8rem; flex-wrap: nowrap; }
    .file-name { font-size: 0.8rem; }
    .file-size { font-size: 0.7rem; }
    .file-remove { padding: 0.15rem 0.4rem; font-size: 0.75rem; }

    /* Settings */
    .settings-panel { padding: 1rem; }
    .settings-grid { grid-template-columns: 1fr; }
    .setting-item { font-size: 0.8rem; padding: 0.35rem 0.4rem; }

    /* Buttons */
    .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    .btn-primary,
    .btn-secondary {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
    }

    /* Results */
    .result-item {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
        padding: 0.6rem 0.75rem;
    }
    .result-item strong { font-size: 0.8rem; }
    .result-item small { font-size: 0.7rem; }
    .btn-download { width: 100%; text-align: center; }
    .btn-compare { width: 100%; text-align: center; }

    /* Preview */
    .preview-section { padding-top: 1rem; }
    .preview-section h3 { font-size: 0.9rem; }
    .preview-info { font-size: 0.75rem; }
    .comparison-container { max-width: 100%; }
    .comparison-slider { min-height: 150px; }
    .comp-handle-circle { width: 32px; height: 32px; }
    .comp-arrow { font-size: 0.7rem; }

    /* History */
    .history-item {
        flex-direction: column;
        gap: 0.3rem;
        align-items: flex-start;
    }
    .history-item .btn-download { width: auto; }

    /* Plans */
    .plans-grid {
        grid-template-columns: 1fr;
        max-width: 550px;
    }
    .plans-section {
        padding: 3rem 1rem;
    }
    .plans-section h2 { font-size: 1.6rem; }
    .plans-section .section-subtitle { font-size: 0.9rem; margin-bottom: 1.5rem; }
    .plan-card.popular { transform: none; }
    .plan-card.popular:hover { transform: none; }
    .plan-card-inner { min-height: auto; }
    .plan-card.popular .plan-header { padding-top: 2.5rem; }
    .plan-header { padding: 1.25rem 1.5rem 0.85rem; }
    .plan-name { font-size: 1.35rem; }
    .plan-body { padding: 0 1.5rem 1.5rem; }
    .plan-desc { font-size: 0.85rem; }
    .plan-option { padding: 1.1rem; }
    .plan-option-period { font-size: 0.85rem; }
    .plan-option-price { font-size: 1.3rem; }
    .plan-option-features li { font-size: 0.85rem; }

    /* Services banner */
    .services-banner {
        padding: 2.5rem 1rem;
    }
    .services-banner-content {
        flex-direction: column;
        text-align: center;
    }
    .services-banner-text h2 { font-size: 1.15rem; }
    .services-banner-text p { max-width: 100%; font-size: 0.85rem; }
    .services-banner-actions {
        flex-direction: column;
        width: 100%;
    }
    .btn-banner-primary,
    .btn-banner-secondary {
        text-align: center;
        width: 100%;
    }

    /* How it works */
    .how-it-works-section {
        padding: 3rem 1rem;
    }
    .how-it-works-section .section-subtitle { font-size: 0.85rem; margin-bottom: 1.5rem; }
    .section-title { font-size: 1.5rem; }

    /* Steps */
    .steps-container,
    .features-grid,
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .step-card { padding: 1.25rem; }
    .step-card h3 { font-size: 0.95rem; }
    .step-card p { font-size: 0.8rem; }
    .step-icon { font-size: 2rem; }
    .feature-card { padding: 1.25rem; }
    .feature-card h4 { font-size: 0.85rem; }
    .feature-card p { font-size: 0.75rem; }

    /* Specs table */
    .specs-table { padding: 1rem; }
    .specs-table h3 { font-size: 0.95rem; }
    .specs-table th,
    .specs-table td {
        padding: 0.4rem 0.5rem;
        font-size: 0.75rem;
    }

    /* Tutorial */
    .tutorial-section { padding: 1.5rem; }
    .tutorial-section h3 { font-size: 1.05rem; }
    .video-wrapper iframe { min-height: 220px; }
    .video-description p { font-size: 0.8rem; }

    /* FAQ */
    .faq-item { padding: 1rem; }
    .faq-question { font-size: 0.85rem; }
    .faq-answer { font-size: 0.8rem; }

    /* Contact */
    .contact-section { padding: 3rem 1rem; }
    .contact-section h2 { font-size: 1.5rem; }
    .contact-section .section-subtitle { font-size: 0.85rem; margin-bottom: 1.5rem; }
    .contact-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .contact-info { padding: 1.25rem; }
    .contact-info-item { padding: 0.75rem 0; }
    .contact-info-item strong { font-size: 0.8rem; }
    .contact-info-item span,
    .contact-info-item a { font-size: 0.8rem; }
    .contact-form { padding: 1.25rem; gap: 0.75rem; }
    .contact-form input,
    .contact-form textarea { padding: 0.55rem 0.75rem; font-size: 0.85rem; }
    .contact-form button { width: 100%; align-self: stretch; }

    /* Footer */
    .site-footer { padding: 1.5rem 1rem; }
    .footer-links { gap: 1rem; }
    .footer-links a { font-size: 0.8rem; }
    .footer-tagline { font-size: 0.75rem; }

    /* Notifications */
    .notification-container {
        top: 0.5rem;
        right: 0.5rem;
        left: 0.5rem;
        max-width: none;
    }
    .notification { font-size: 0.8rem; padding: 0.6rem 0.85rem; }

    /* Modals */
    .modal-content {
        padding: 1.5rem;
        width: 95%;
        max-width: 95%;
        top: 50%;
        max-height: 85vh;
    }
    .modal-content h2 { font-size: 1.1rem; }
    .modal-content input { padding: 0.55rem 0.65rem; font-size: 0.85rem; }
    .modal-content button[type="submit"] { padding: 0.55rem; font-size: 0.85rem; }
    .close { right: 0.75rem; top: 0.75rem; font-size: 1.1rem; }

    /* Payment modal */
    .payment-modal-content { max-width: 95%; }
    .payment-plan-details { padding: 1rem; }
    .payment-plan-price { font-size: 1.5rem; }
    .payment-plan-features li { font-size: 0.7rem; }
    .payment-method { padding: 0.6rem 0.75rem; }
    .pm-name { font-size: 0.85rem; }
    .pm-desc { font-size: 0.7rem; }
    .payment-period-options { grid-template-columns: 1fr 1fr; }
    .period-option { padding: 0.5rem; }
    .period-name { font-size: 0.8rem; }
    .period-price { font-size: 0.75rem; }
    .btn-pay { padding: 0.65rem; font-size: 0.9rem; }

    /* Status bar */
    .status-bar {
        font-size: 0.65rem;
        padding: 0.25rem 1rem;
    }
    .status-divider { display: none; }
    .status-bar-inner {
        flex-wrap: wrap;
        gap: 0.2rem 0.75rem;
    }

    /* Usage banner */
    .usage-banner { padding: 0.5rem 0.75rem; font-size: 0.75rem; }

    /* Account page */
    .account-page { flex-direction: column; }
    .account-sidebar {
        width: 100%;
        flex-direction: row;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 0.5rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .account-nav { flex-direction: row; gap: 0.25rem; padding: 0; }
    .account-nav-item {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    .account-sidebar-footer { display: none; }
    .account-content {
        padding: 1.25rem 1rem;
        max-width: 100%;
    }
    .account-panel-title { font-size: 1.1rem; margin-bottom: 1rem; }
    .account-form { max-width: 100%; }
    .df-input,
    .df-group input { font-size: 0.85rem; padding: 0.55rem 0.7rem; }
    .plan-info-card { padding: 1rem; }
    .pi-row { flex-direction: column; gap: 0.2rem; align-items: flex-start; }
    .pi-label { font-size: 0.75rem; }
    .pi-value { font-size: 0.85rem; }
    .pref-lang-options { flex-direction: column; gap: 0.4rem; }
    .pref-toggle { padding: 0.4rem 0.6rem; }

    /* Scroll to top */
    .scroll-top {
        bottom: 1rem;
        right: 1rem;
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    /* Global error overlay */
    .global-error-box { padding: 1.5rem; }
    .global-error-box h3 { font-size: 1rem; }
    .global-error-box p { font-size: 0.8rem; }
    .global-error-box button { padding: 0.45rem 1.25rem; font-size: 0.85rem; }

    /* Tooltip */
    .tooltip-icon::after {
        width: 180px;
        font-size: 0.7rem;
        left: 0;
        transform: none;
    }
}

/* Mobile portrait (up to 480px) */
@media (max-width: 480px) {
    /* Hero */
    .hero { padding: 2rem 0.75rem; }
    .hero-content h1 { font-size: 1.4rem; }
    .hero-content p { font-size: 0.85rem; }

    /* Converter */
    .converter-section { padding: 1rem 0.75rem 2rem; }
    .converter-card { padding: 1rem; }
    .converter-card h2 { font-size: 1rem; }
    .drop-zone { padding: 1rem 0.75rem; min-height: 100px; }
    .drop-zone-text { font-size: 0.8rem; }
    .drop-icon { font-size: 1.5rem; }

    .files-header { font-size: 0.75rem; padding: 0.4rem 0.5rem; }
    .file-item { padding: 0.4rem 0.5rem; font-size: 0.75rem; }

    .settings-panel { padding: 0.75rem; }
    .settings-panel h3 { font-size: 0.85rem; }

    .btn-primary,
    .btn-secondary { padding: 0.5rem 0.85rem; font-size: 0.8rem; }

    /* Plans */
    .plans-section { padding: 2rem 0.75rem; }
    .plans-section h2 { font-size: 1.4rem; }
    .plans-grid { gap: 1rem; }
    .plan-header { padding: 1rem 1.25rem 0.75rem; }
    .plan-name { font-size: 1.2rem; }
    .plan-body { padding: 0 1.25rem 1.25rem; }
    .plan-option { padding: 0.9rem; }
    .plan-option-price { font-size: 1.2rem; }
    .plan-option-features li { font-size: 0.8rem; }

    /* How it works */
    .how-it-works-section { padding: 2rem 0.75rem; }
    .section-title { font-size: 1.3rem; }

    /* Services banner */
    .services-banner { padding: 2rem 0.75rem; }
    .services-banner-text h2 { font-size: 1rem; }

    /* Contact */
    .contact-section { padding: 2rem 0.75rem; }
    .contact-section h2 { font-size: 1.3rem; }
    .contact-info { padding: 1rem; }
    .contact-form { padding: 1rem; }

    /* Modals */
    .modal-content { padding: 1.25rem; }

    /* Payment */
    .payment-plan-details { padding: 0.75rem; }
    .payment-plan-features { gap: 0.25rem; }
    .payment-period-options { grid-template-columns: 1fr; }

    /* Notifications */
    .notification-container { top: 0.25rem; right: 0.25rem; left: 0.25rem; }
    .notification { font-size: 0.75rem; padding: 0.5rem 0.75rem; }

    /* Status bar */
    .status-bar-inner { font-size: 0.6rem; }
}

/* Pedimento modal and cards */
#pedimentoModal .modal-content {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
}

#pedimentoModal .modal-close {
    color: var(--text-secondary);
}

.pedimento-card {
    transition: background 0.3s, border-color 0.3s;
}

.pedimento-card:hover {
    border-color: var(--primary) !important;
}

#pedimentosList .btn-ped-edit:hover,
#pedimentosList .btn-ped-delete:hover {
    opacity: 0.8;
}

/* Small mobile (up to 360px) */
@media (max-width: 360px) {
    .hero-content h1 { font-size: 1.2rem; }
    .plan-option-price { font-size: 1rem; }
    .comparison-slider { min-height: 120px; }
    .comp-handle-circle { width: 28px; height: 28px; }
    .step-icon { font-size: 1.5rem; }
    .feature-icon { font-size: 1.5rem; }
}
