:root {
    /* Premium Color Palette */
    --primary: #c9933b;
    --primary-dark: #a87b31;
    --primary-light: #e6c587;
    --secondary: #2c3e50;
    --secondary-dark: #1a252f;
    --accent: #e74c3c;
    --success: #27ae60;
    --danger: #e74c3c;
    --warning: #f39c12;
    --info: #3498db;
    
    /* Neutrals */
    --gray-50: #f8f9fa;
    --gray-100: #f1f3f5;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #868e96;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    
    /* Typography */
    --font-primary: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
    
    /* Layout */
    --max-width: 1200px;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    --box-shadow-hover: 0 10px 15px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-primary);
    color: var(--gray-800);
    background-color: var(--gray-50);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--secondary-dark);
    margin-bottom: 1rem;
    font-weight: 700;
}

a {
    color: var(--primary-dark);
    text-decoration: none;
    transition: var(--transition);
}

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

/* Navbar */
.navbar {
    background: #fff;
    box-shadow: var(--box-shadow);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-container {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-highlight {
    color: var(--secondary);
}

.navbar-menu {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: var(--gray-700);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
}

.nav-link:hover {
    background: var(--gray-100);
    color: var(--primary-dark);
}

.nav-link-admin {
    color: var(--accent);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-primary);
    font-weight: 500;
    color: var(--gray-800);
}

.nav-avatar {
    background: var(--primary);
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-weight: bold;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    box-shadow: var(--box-shadow-hover);
    border-radius: var(--border-radius);
    min-width: 200px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: var(--gray-800);
}

.dropdown-item:hover {
    background: var(--gray-100);
    color: var(--primary-dark);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--secondary);
    color: #fff;
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

.btn-glow {
    box-shadow: 0 0 15px rgba(201, 147, 59, 0.4);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(201, 147, 59, 0.2);
}

/* Alerts / Messages - Modern Floating Toaster */
.messages-container {
    position: fixed;
    top: 90px;
    right: 24px;
    z-index: 10000;
    max-width: 380px;
    width: calc(100% - 48px);
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    margin: 0;
    pointer-events: none; /* Let clicks pass through empty areas */
}

.message {
    pointer-events: auto; /* Re-enable pointer events for the actual toast */
    padding: 1rem 1.25rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.04);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-bottom: 0;
    animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Slide in animation */
@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Border indicator representing status */
.message::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
}

.message-success::before { background: #10b981; }
.message-error::before { background: #ef4444; }
.message-warning::before { background: #f59e0b; }
.message-info::before { background: #3b82f6; }

/* Message Colors */
.message-success {
    border-left: none;
    color: #065f46;
}
.message-error {
    border-left: none;
    color: #991b1b;
}
.message-warning {
    border-left: none;
    color: #92400e;
}
.message-info {
    border-left: none;
    color: #1e40af;
}

/* Icon customization */
.message-icon {
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message-text {
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.4;
    padding-right: 1.5rem;
}

.message-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s ease;
    padding: 0;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.message-close:hover {
    color: #475569;
}

/* Layout Elements */
.main-content {
    flex: 1;
    padding: 2rem;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
}

/* Cards */
.card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Grid */
.grid {
    display: grid;
    gap: 2rem;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

.site-footer {
    background: #0f1f33;
    color: #fff;
    padding: 40px 0 20px;
}

.footer-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Horizontal Layout */
.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 50px;
    flex-wrap: nowrap;
}

.footer-brand {
    flex: 2;
}

.footer-links {
    flex: 1;
}

.footer-brand h3,
.footer-links h4 {
    margin-bottom: 15px;
    color: #fff;
}

.footer-brand p {
    line-height: 1.7;
    color: #ddd;
}

.footer-links {
    display: flex;
    flex-direction: column;
}

.footer-links a {
    color: #ddd;
    text-decoration: none;
    margin-bottom: 10px;
    transition: 0.3s;
}

.footer-links a:hover {
    color: #f4b942;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.15);
    margin-top: 30px;
    padding-top: 20px;
    text-align: center;
    color: #bbb;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .footer-grid {
        flex-direction: column;
        gap: 25px;
    }
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25em 0.5em;
    font-size: 0.75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}
.bg-success { background-color: var(--success); color: white; }
.bg-warning { background-color: var(--warning); color: white; }
.bg-danger { background-color: var(--danger); color: white; }
.bg-info { background-color: var(--info); color: white; }
.bg-primary { background-color: var(--primary); color: white; }

/* Dashboard specifics */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    text-align: center;
    border-top: 4px solid var(--primary);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--secondary-dark);
}

.stat-label {
    color: var(--gray-600);
    font-weight: 500;
}

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.table th, .table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid var(--gray-300);
    text-align: left;
}

.table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid var(--gray-300);
    background-color: var(--gray-50);
}

/* Pricing Plans */
.plan-card {
    background: #fff;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
    text-align: center;
    position: relative;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}
.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-hover);
}
.plan-popular {
    border-color: var(--primary);
    box-shadow: 0 0 20px rgba(201, 147, 59, 0.2);
}
.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}
.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-dark);
    margin: 1.5rem 0;
}
.plan-features {
    list-style: none;
    margin: 2rem 0;
    text-align: left;
}
.plan-features li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}
.plan-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success);
}

/* Fluid Layout */
.main-fluid {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
}

/* Global Mobile Responsive Overrides */
@media (max-width: 768px) {
    .main-content {
        padding: 1.5rem 1rem;
    }
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    /* Profile detail header stacking */
    .profile-detail-header {
        flex-direction: column;
        text-align: center;
    }
    .profile-detail-header .profile-photo-large {
        margin: 0 auto 1rem;
    }
    .profile-header-info .profile-actions {
        flex-direction: column;
        gap: 0.75rem;
        align-items: stretch;
    }
    .profile-header-info .profile-actions .btn {
        width: 100%;
        text-align: center;
    }
    .profile-quick-info {
        justify-content: center;
        flex-wrap: wrap;
    }
    /* Detail grids single column on mobile */
    .details-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    /* Stats grid */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    /* Tables - smaller font, tighter padding */
    .table th, .table td {
        padding: 0.5rem 0.4rem;
        font-size: 0.85rem;
    }
    /* Card padding reduction */
    .card {
        padding: 1.25rem;
    }
}

@media (max-width: 576px) {
    .auth-container {
        margin: 2rem 1rem !important;
        padding: 1.5rem 1rem !important;
        width: auto !important;
        max-width: 100% !important;
    }
    .main-content {
        padding: 1rem 0.75rem;
    }
}
