@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --secondary: #10b981;
    --bg-color: #f9fafb;
    --surface: #ffffff;
    --text-main: #111827;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 8px;
    --radius-lg: 12px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-color);
    -webkit-font-smoothing: antialiased;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: 70px;
    display: flex;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.05em;
}

.logo span {
    color: var(--text-main);
    font-weight: 600;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li a {
    text-decoration: none;
    color: var(--text-muted);
    padding: 0 16px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links li a:hover {
    color: var(--text-main);
}

.btn-login, .btn-primary {
    background: var(--primary) !important;
    color: #ffffff !important;
    padding: 10px 24px !important;
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    text-decoration: none;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition) !important;
    display: inline-block;
    text-align: center;
}

.btn-login:hover, .btn-primary:hover {
    background: var(--primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Hero Section */
.hero {
    background: radial-gradient(circle at top right, #312e81, #0f172a);
    padding: 120px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #ffffff;
    min-height: 70vh;
    border-bottom: 1px solid #1e293b;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 24px;
    background: linear-gradient(to right, #ffffff, #a5b4fc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    color: #94a3b8;
    font-weight: 400;
}

/* Sections */
.section {
    padding: 96px 0;
}

.bg-light {
    background-color: var(--surface);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-title {
    text-align: center;
    margin-bottom: 64px;
}

.section-title h2 {
    font-size: 2.25rem;
    color: var(--text-main);
}

/* Cards */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.card {
    background: var(--surface);
    padding: 32px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}

.card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 24px;
    background: #e0e7ff;
    padding: 16px;
    border-radius: var(--radius-md);
    display: inline-block;
}

.card h3 {
    margin-bottom: 12px;
    font-size: 1.25rem;
}

.card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Forms & Inputs globally applied to override inline styles */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select,
textarea {
    width: 100%;
    padding: 12px 16px !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    color: var(--text-main);
    background-color: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    outline: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2) !important;
}

form {
    background: var(--surface);
    padding: 40px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
}

/* Footer */
.footer {
    background: #0f172a;
    color: #f8fafc;
    padding: 80px 0 30px;
    border-top: 1px solid #1e293b;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 48px;
    margin-bottom: 48px;
}

.footer-section h3 {
    margin-bottom: 24px;
    font-size: 1.1rem;
    color: #ffffff;
}

.footer-section p {
    color: #94a3b8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
}

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: #ffffff;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #1e293b;
    padding-top: 24px;
    color: #64748b;
    font-size: 0.9rem;
}

/* Mobile Menu */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 24px;
    height: 2px;
    background-color: var(--text-main);
    margin: 4px 0;
    transition: 0.3s;
    border-radius: 2px;
}

@media screen and (max-width: 768px) {
    .nav-links {
        display: none; 
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 20px 0;
        border-bottom: 1px solid var(--border-color);
        box-shadow: var(--shadow-md);
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links li {
        width: 100%;
        text-align: center;
        margin-bottom: 15px;
    }
    .menu-toggle {
        display: flex;
    }
    .hero-content h1 {
        font-size: 2.25rem;
    }
    .hero {
        padding: 80px 0;
        min-height: 50vh;
    }
    form {
        padding: 24px;
    }
}

/* Admin Dashboard Specific Enhancements */
.admin-container {
    background-color: var(--bg-color);
}

.sidebar {
    background: #0f172a !important;
    color: white;
    border-right: 1px solid #1e293b;
}

.sidebar h2 {
    color: #ffffff;
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.sidebar a {
    color: #94a3b8 !important;
    padding: 12px 16px !important;
    border-radius: var(--radius-md);
    margin-bottom: 8px;
    border-bottom: none !important;
    transition: var(--transition);
}

.sidebar a:hover {
    background: #1e293b;
    color: #ffffff !important;
}

.sidebar a i {
    width: 24px;
    text-align: center;
    margin-right: 8px;
}

.main-content {
    background-color: var(--bg-color) !important;
    padding: 48px !important;
}

.main-content h1 {
    font-size: 2rem;
    margin-bottom: 32px;
}

table {
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm) !important;
}

th {
    background: #f8fafc !important;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 16px !important;
    border-bottom: 1px solid var(--border-color) !important;
}

td {
    padding: 16px !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-main);
    font-size: 0.95rem;
}

tr:hover td {
    background: #f8fafc;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1);
}

/* --- APP SHELL (SIDEBAR & TOP NAV) --- */
.app-shell {
    display: flex;
    min-height: 100vh;
    background: var(--bg-color);
}

/* Sidebar */
.sidebar-app {
    width: 260px;
    background: #0f172a;
    color: #94a3b8;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1001;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.sidebar-app.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h2 {
    color: #fff;
    font-size: 1.25rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-app.collapsed .sidebar-header h2 {
    display: none;
}

.sidebar-menu {
    flex: 1;
    padding: 10px 16px;
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--radius-md);
    transition: var(--transition);
    white-space: nowrap;
}

.sidebar-menu li a i {
    width: 24px;
    font-size: 1.2rem;
    margin-right: 12px;
    text-align: center;
}

.sidebar-app.collapsed .sidebar-menu li a i {
    margin-right: 0;
}

.sidebar-app.collapsed .sidebar-menu li a span {
    display: none;
}

.sidebar-menu li a:hover, .sidebar-menu li.active a {
    background: #1e293b;
    color: #fff;
}

.sidebar-menu li.active a {
    background: var(--primary);
}

/* Main Content Wrapper */
.app-main {
    flex: 1;
    margin-left: 260px;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.app-shell.sidebar-collapsed .app-main {
    margin-left: 80px;
}

/* Top Navbar */
.top-navbar {
    height: 70px;
    background: var(--surface);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.search-container {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.search-container input {
    padding-left: 40px !important;
    background: #f3f4f6 !important;
    border: none !important;
}

.search-container i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: var(--surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    margin-top: 8px;
    display: none;
    overflow: hidden;
    z-index: 1002;
}

.search-results.active {
    display: block;
}

.search-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

.search-item:last-child {
    border-bottom: none;
}

.search-item:hover {
    background: #f8fafc;
}

.search-item i {
    margin-right: 12px;
    color: var(--primary);
    position: static;
    transform: none;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.notification-bell {
    position: relative;
    font-size: 1.2rem;
    color: var(--text-muted);
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 0.65rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Page Content */
.app-content {
    padding: 32px;
    flex: 1;
}

/* Mobile Adjustments for App Shell */
@media screen and (max-width: 768px) {
    .sidebar-app {
        left: -260px;
    }
    .sidebar-app.mobile-active {
        left: 0;
    }
    .app-main {
        margin-left: 0 !important;
    }
    .top-navbar {
        padding: 0 16px;
    }
    .search-container {
        max-width: 180px;
    }
    .desktop-only {
        display: none;
    }
    .mobile-only {
        display: block;
    }
}

@media screen and (min-width: 769px) {
    .mobile-only {
        display: none;
    }
    .desktop-only {
        display: block;
    }
}
