/* Mailsuite-inspired Premium Design System */

:root {
    /* Primary brand colors */
    --primary-color: #20B2AA;
    --primary-glow: rgba(32, 178, 170, 0.3);
    --primary-dark: #1a8e88;
    --accent-color: #fca311;

    /* Default Dark Theme Tokens */
    --bg-primary: #0a0b10;
    --bg-secondary: #14161f;
    --bg-tertiary: #1c1f2b;
    --card-bg: rgba(20, 22, 31, 0.8);
    --text-primary: #f8f9fa;
    --text-secondary: #b0b3b8;
    --text-muted: #6c757d;
    --border-color: rgba(255, 255, 255, 0.1);
    --border-light: rgba(255, 255, 255, 0.05);

    /* Shadows & Effects */
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 8px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 16px 32px rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(20, 22, 31, 0.7);
    --glass-blur: blur(12px);

    /* Gradients */
    --hero-gradient: radial-gradient(circle at top right, #1a2a3a, #0a0b10);
    --accent-gradient: linear-gradient(135deg, var(--primary-color) 0%, #1a8e88 100%);

    /* Inputs */
    --input-bg: #1c1f2b;
    --input-border: rgba(255, 255, 255, 0.1);
    --input-focus: var(--primary-color);

    /* Others */
    --navbar-bg: rgba(10, 11, 16, 0.8);
    --footer-bg: #050507;
}

/* Light Theme (Override if requested) */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f4f7f6;
    --bg-tertiary: #e9ecef;
    --card-bg: #ffffff;
    --text-primary: #1a1c23;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --border-color: #e2e8f0;
    --border-light: #edf2f7;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --navbar-bg: rgba(255, 255, 255, 0.9);
    --hero-gradient: linear-gradient(135deg, #f6f9fc 0%, #eef2f7 100%);
    --input-bg: #ffffff;
    --input-border: #cbd5e0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.navbar-brand {
    font-family: 'Outfit', sans-serif;
}

/* Navigation */
.navbar {
    padding: 1.25rem 0;
    background-color: var(--navbar-bg) !important;
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
}

.logo-img {
    transition: opacity 0.3s ease, transform 0.3s ease;
    height: 36px;
    width: auto;
}

.navbar-brand:hover .logo-img {
    transform: scale(1.05);
}

/* Logo adapts to theme automatically via SVG gradients */
[data-theme="dark"] .navbar-brand .logo-img {
    /* SVG gradient will work in both themes */
    opacity: 0.95;
}

/* Footer logo - use dark version in dark mode */
[data-theme="dark"] .footer-logo {
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-primary) !important;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.nav-link {
    font-weight: 500;
    color: var(--text-primary) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--primary-color) !important;
}

/* Theme Toggle Button */
.theme-toggle-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--primary-color);
}

.theme-icon-light,
.theme-icon-dark {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

[data-theme="dark"] .theme-icon-light {
    display: none !important;
}

[data-theme="dark"] .theme-icon-dark {
    display: block !important;
}

[data-theme="light"] .theme-icon-light {
    display: block !important;
}

[data-theme="light"] .theme-icon-dark {
    display: none !important;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 160px 0 100px;
    background: var(--hero-gradient);
    overflow: hidden;
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    transition: background 0.3s ease;
}



.hero-title {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -1.5px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 540px;
    margin-bottom: 2.5rem;
}

.hero-buttons .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.hero-buttons .btn-primary {
    background: white;
    color: var(--primary-color);
    border: none;
}

.hero-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.hero-buttons .btn-outline-primary {
    border: 2px solid white;
    color: white;
    background: transparent;
}

.hero-buttons .btn-outline-primary:hover {
    background: white;
    color: var(--primary-color);
}

.hero-stats {
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin: 0;
}

.hero-image img {
    animation: float 3s ease-in-out infinite;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background-color: var(--bg-primary);
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.about-content .lead {
    font-size: 1.3rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.feature-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
}

.feature-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

.feature-card:hover {
    background: var(--bg-tertiary);
    border-color: var(--primary-color);
    transform: translateY(-10px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-glow);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary-color);
    margin: 0 auto 1.5rem;
}

.feature-card h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Pricing Section */
.pricing-section {
    padding: 80px 0;
    background-color: var(--bg-primary);
}

.pricing-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 24px;
    padding: 2.5rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    text-align: center;
}

.pricing-card.animate-in {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-md);
}

.pricing-section .section-subtitle {
    margin-bottom: 4rem !important;
}

.pricing-card.featured {
    border-color: var(--primary-color);
    box-shadow: 0 10px 30px rgba(32, 178, 170, 0.1);
    transform: scale(1.02);
    margin-top: -10px;
    /* Slight offset for featured card */
}

.pricing-card.featured.animate-in {
    transform: scale(1.05) translateY(0);
}

.pricing-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 8px 24px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(32, 178, 170, 0.3);
    z-index: 10;
}

.pricing-header h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.pricing-price {
    margin: 1.5rem 0;
}

.pricing-price .currency {
    font-size: 1.5rem;
    vertical-align: top;
}

.pricing-price .amount {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
}

.pricing-price .period {
    font-size: 1rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.5rem;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
    text-align: left;
}

.pricing-features li {
    padding: 0.75rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li i {
    color: var(--secondary-color);
    margin-right: 0.5rem;
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background-color: var(--bg-secondary);
}

.contact-form-card {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.contact-form-card .form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.contact-form-card .form-control {
    background-color: var(--input-bg);
    border: 2px solid var(--input-border);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.contact-form-card .form-control:focus {
    background-color: var(--input-bg);
    border-color: var(--input-focus-border);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(26, 115, 232, 0.1);
}

.contact-form-card .form-control::placeholder {
    color: var(--text-muted);
}

/* Footer */
.footer {
    margin-top: 80px;
    background-color: var(--footer-bg) !important;
    color: var(--footer-text);
}

.footer h5,
.footer h6 {
    color: var(--footer-text);
}

.footer a {
    color: var(--footer-link);
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--footer-text) !important;
}

.social-links a {
    font-size: 1.5rem;
    transition: transform 0.3s ease, color 0.3s ease;
    color: var(--footer-link);
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--footer-text);
}

.footer hr {
    border-color: var(--border-color);
    opacity: 0.3;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary {
    background: var(--accent-gradient) !important;
    border: none !important;
    box-shadow: 0 4px 15px var(--primary-glow);
    color: white !important;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
}

.btn-outline-primary {
    border-color: var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

/* Alerts */
.alert {
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.alert-success {
    background-color: rgba(52, 168, 83, 0.1);
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.alert-danger {
    background-color: rgba(234, 67, 53, 0.1);
    border-color: #ea4335;
    color: #ea4335;
}

/* Sidebar & Dashboard */
.sidebar {
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    backdrop-filter: var(--glass-blur);
}

.nav-pills .nav-link.active {
    background: var(--accent-gradient) !important;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.main-content {
    background: var(--bg-primary);
}

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    background: var(--bg-tertiary) !important;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
}

.card-body {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.table {
    margin-bottom: 0;
    color: var(--text-primary);
}

.table thead th {
    background: var(--bg-tertiary) !important;
    border-bottom: 2px solid var(--border-color) !important;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    padding: 1rem;
}

.table tbody td {
    border-bottom: 1px solid var(--border-light);
    padding: 1.25rem 1rem;
    vertical-align: middle;
    background: transparent !important;
    color: var(--text-primary) !important;
}

.table-hover tbody tr:hover td {
    background-color: var(--bg-tertiary) !important;
}

.progress {
    background-color: var(--bg-tertiary) !important;
    border-radius: 10px;
}

/* Stats Cards */
.stat-card {
    padding: 1.5rem;
    border-radius: 20px;
    background: linear-gradient(145deg, var(--bg-secondary), var(--bg-tertiary));
    border: 1px solid var(--border-color);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Badge Refinements */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 600;
    border-radius: 6px;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* Custom Scrollbar for Dark Theme */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}


/* Responsive */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .pricing-card.featured {
        transform: scale(1);
    }

    .pricing-card.featured.animate-in {
        transform: scale(1) translateY(0);
    }

    .contact-form-card {
        padding: 2rem;
    }

    .hero-section {
        padding: 100px 0 60px;
    }

    .theme-toggle-btn {
        margin-left: 0.5rem;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Navbar scroll effect */
.navbar.scrolled {
    background-color: var(--navbar-bg) !important;
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
}

/* Modal Dark Theme Fixes */
.modal-content {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
}

.modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

[data-theme="light"] .modal-header .btn-close {
    filter: none;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-tertiary);
}

.modal-body {
    background-color: var(--bg-secondary);
}

/* Fix table text in modals for dark theme */
.modal-body .table {
    color: var(--text-primary) !important;
}

.modal-body .table-sm th {
    color: var(--text-secondary);
    border-bottom-color: var(--border-color);
}

.modal-body .table-sm td {
    border-bottom-color: var(--border-light);
    color: var(--text-primary) !important;
}

/* Badge colors in modal */
.modal-body .badge {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Timeline/Information Header in Modal */
.modal-body h6 {
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 1rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}


/* Image filter for dark mode */
[data-theme="dark"] img {
    filter: brightness(0.9) contrast(1.1);
}

/* Dashboard placeholder */
.dashboard-placeholder {
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
}

[data-theme="dark"] .dashboard-placeholder {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Utility Classes */
.py-10 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

.mb-10 {
    margin-bottom: 5rem !important;
}

.relative {
    position: relative !important;
}

.z-10 {
    z-index: 10 !important;
}

.rounded-3xl {
    border-radius: 1.5rem !important;
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
}