:root {
    --primary: #0152ad;
    --primary-hover: #4338ca;
    --bg: #f3f4f6;
    --text: #1f2937;
    --card-bg: #ffffff;
    --danger: #ef4444;
    --success: #10b981;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding-top: 80px; /* Space for fixed header on desktop */
}

/* --- NAVIGATION --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    z-index: 1000;
}

.logo-container img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-link {
    color: var(--text);
    text-decoration: none;
    font-weight: 500;
    margin-right: 1rem;
}

.nav-link:hover {
    color: var(--primary);
}

.login-btn {
    background-color: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.login-btn:hover {
    background-color: var(--primary-hover);
}

/* --- DROPDOWN --- */
.profile-dropdown {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.profile-dropdown:hover {
    background-color: #f3f4f6;
}

.profile-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    object-fit: cover;
    background: #e0e7ff;
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid #e0e7ff;
}

.profile-name {
    font-weight: 500;
    color: var(--text);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 220px;
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 1001;
}

.dropdown-menu.show {
    display: flex;
}

.dropdown-item {
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text);
    font-size: 0.9rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.2s;
}

.dropdown-item:last-child {
    border-bottom: none;
    color: #dc2626;
}

.dropdown-item:hover {
    background: #f9fafb;
}

/* --- GENERAL LAYOUT & FORMS --- */
.container {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
    margin-top: 1rem;
    margin-bottom: 2rem;
    box-sizing: border-box;
}

.container.dashboard, .container.wide {
    max-width: 800px;
}

.container.extra-wide {
    max-width: 1200px;
}

.container.pricing-container {
    max-width: 1000px;
}

h2 {
    margin-top: 0;
    text-align: center;
    color: var(--primary);
}

h3 {
    margin-top: 0;
    color: var(--text);
}

.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-sizing: border-box;
    background-color: white;
    font-family: inherit;
    font-size: 1rem;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

button {
    width: 100%;
    padding: 0.75rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

button:hover {
    background-color: var(--primary-hover);
}

/* --- PAYMENT & UTILS --- */
.payment-card-input {
    font-family: monospace;
    letter-spacing: 2px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%239ca3af" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="1" y="4" width="22" height="16" rx="2" ry="2"></rect><line x1="1" y1="10" x2="23" y2="10"></line></svg>');
    background-repeat: no-repeat;
    background-position: 10px center;
    padding-left: 40px;
}

.payment-row {
    display: flex;
    gap: 1rem;
}

.payment-col {
    flex: 1;
}

.secure-badge {
    text-align: center;
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.toggle-text {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.toggle-link {
    color: var(--primary);
    cursor: pointer;
    text-decoration: underline;
}

.back-link {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

.alert {
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    text-align: center;
}

.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.hidden {
    display: none;
}

/* --- DASHBOARD GRID --- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1.5rem;
}

.info-card {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
}

.info-value {
    font-size: 1.125rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.logout-btn {
    background-color: #ef4444;
    margin-top: 2rem;
}

.logout-btn:hover {
    background-color: #dc2626;
}

/* --- PRICING --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.pricing-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.pricing-card.silver {
    border-color: #94a3b8;
    background: linear-gradient(to bottom right, #ffffff, #f1f5f9);
}

.pricing-card.gold {
    border-color: #fbbf24;
    background: linear-gradient(to bottom right, #fffbeb, #ffffff);
    position: relative;
    overflow: hidden;
}

.pricing-card.gold::before {
    content: "Best Value";
    position: absolute;
    top: 15px;
    right: -30px;
    background: #fbbf24;
    color: #78350f;
    padding: 5px 40px;
    transform: rotate(45deg);
    font-size: 0.75rem;
    font-weight: bold;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.5rem;
}

.plan-price {
    font-size: 2rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 1rem;
}

.plan-period {
    font-size: 0.875rem;
    color: #6b7280;
    font-weight: normal;
}

.plan-desc {
    font-size: 0.875rem;
    color: #4b5563;
    margin-bottom: 1.5rem;
    min-height: 40px;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem 0;
    text-align: left;
}

.feature-list li {
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    display: flex;
    align-items: flex-start;
}

.feature-icon {
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.btn-select {
    margin-top: auto;
}

/* --- PROFILE & SETTINGS --- */
.profile-field {
    margin-bottom: 1rem;
}

.section {
    margin-bottom: 2rem;
}

.btn-small {
    width: auto;
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* --- FOOTER --- */
.footer {
    margin-top: auto;
    width: 100%;
    padding: 1.5rem 0;
    text-align: center;
    color: #6b7280;
    font-size: 0.9rem;
    border-top: 1px solid #e5e7eb;
    background-color: white;
}

/* --- RESPONSIVE MEDIA QUERIES --- */
@media (max-width: 768px) {
    body {
        padding-top: 0;
    }

    /* Navbar Mobile */
    .navbar {
        position: relative;
        height: auto;
        flex-direction: column;
        padding: 1rem;
        gap: 1rem;
    }

    .nav-right {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Containers */
    .container, 
    .container.dashboard, 
    .container.wide, 
    .container.extra-wide {
        width: 90%;
        padding: 1.5rem;
        margin: 1rem auto;
    }

    /* Grids */
    .info-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    /* Forms */
    .payment-row {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .container {
        width: 95%;
        padding: 1rem;
    }

    .nav-link {
        font-size: 0.9rem;
        margin-right: 0.5rem;
    }

    .login-btn {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
}