/**
 * Tekknic.com - Modern Custom Styles
 * Modern, professional, and user-friendly design
 */

:root {
    /* Primary — derin lacivert + camgöbeği vurgu */
    --primary: #0f766e;
    --primary-dark: #0d5c56;
    --primary-light: #14b8a6;
    --secondary: #64748b;
    --accent: #38bdf8;
    
    /* Status Colors */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Background */
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-dark: #1f2937;
    
    /* Text */
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    
    /* Borders */
    --border-color: #e5e7eb;
    --border-radius: 0.5rem;
    --border-radius-lg: 0.75rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    
    /* Typography */
    --font-sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-display: "Plus Jakarta Sans", var(--font-sans);
    
    /* Transitions */
    --transition: all 0.2s ease-in-out;
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sabit üst çubuk + #anchor hedefleri */
html {
    scroll-padding-top: 5.5rem;
}

body:has(.sidebar) {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 100vh;
}

/* Sidebar ile içerik yan yana; footer bu sütunun içinde kalır (body'de üçüncü flex öğesi olmasın) */
.app-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    margin-inline-start: 268px;
    min-height: 100vh;
}

.main-wrapper {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

@media (max-width: 991.98px) {
    .app-main {
        margin-inline-start: 0;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.text-muted {
    color: var(--text-muted) !important;
}

/* Buttons — Bootstrap .btn değişkenleri ve dropdown-toggle ile uyumlu; border:none tüm butonları bozuyordu */
.btn {
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--secondary);
    color: white;
    border: 1px solid var(--secondary);
}

.btn-outline-primary {
    border: 1px solid var(--primary);
    color: var(--primary);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Cards */
.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--gray-50);
    border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background-color: var(--gray-50);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

/* Forms */
.form-control, .form-select {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.9375rem;
    transition: var(--transition);
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.input-group-text {
    background-color: var(--gray-100);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--border-radius);
    border: none;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.alert-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.alert-info {
    background-color: #cffafe;
    color: #155e75;
}

/* Navigation */
.navbar {
    background: var(--bg-primary) !important;
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary) !important;
    padding: 0.5rem 1rem !important;
    transition: var(--transition);
    border-radius: var(--border-radius);
}

.nav-link:hover, .nav-link.active {
    color: var(--primary) !important;
    background-color: var(--gray-50);
}

/* Tables */
.table {
    background-color: var(--bg-primary);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.table thead {
    background-color: var(--gray-50);
}

.table thead th {
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: var(--gray-50);
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse 120% 80% at 20% 0%, rgba(20, 184, 166, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 100% 60% at 100% 100%, rgba(56, 189, 248, 0.2) 0%, transparent 50%),
        linear-gradient(165deg, #0f172a 0%, #134e4a 48%, #042f2e 100%);
    padding: 2rem;
    position: relative;
}

.login-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: 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.9;
    pointer-events: none;
}

.login-card {
    width: 100%;
    max-width: 440px;
    background: rgba(255, 255, 255, 0.97);
    border-radius: 1.25rem;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12),
        0 25px 50px -12px rgba(0, 0, 0, 0.45);
    overflow: hidden;
    position: relative;
    backdrop-filter: blur(12px);
}

.login-header {
    text-align: center;
    padding: 2.5rem 2rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.login-header .logo-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 2rem;
}

.login-header h2 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.login-header p {
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
    font-size: 0.9375rem;
}

.login-body {
    padding: 2rem;
}

/* Dashboard */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-card-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.stat-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--gray-100);
    color: var(--primary);
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.stat-card-footer {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Badges */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
    font-size: 0.75rem;
}

.badge-primary {
    background-color: var(--primary);
    color: white;
}

.badge-success {
    background-color: var(--success);
    color: white;
}

.badge-danger {
    background-color: var(--danger);
    color: white;
}

.badge-warning {
    background-color: var(--warning);
    color: white;
}

/* Utilities */
.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow { box-shadow: var(--shadow); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.rounded { border-radius: var(--border-radius); }
.rounded-lg { border-radius: var(--border-radius-lg); }

/* Loading Spinner */
.spinner {
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .login-container {
        padding: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */
.sidebar {
    width: 268px;
    background: linear-gradient(180deg, #0f172a 0%, #0c4a3e 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: transform 0.3s ease;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.12);
}

.sidebar-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #f8fafc;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
}

.sidebar-brand i {
    font-size: 1.75rem;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: rgba(248, 250, 252, 0.7);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
}

.sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}

.sidebar-nav {
    padding: 0 0.75rem;
}

.sidebar-nav ul {
    list-style: none;
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.nav-menu {
    list-style: none;
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: rgba(248, 250, 252, 0.72);
    text-decoration: none;
    border-radius: 0.5rem;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.nav-item.active > .nav-link,
.nav-item.active > .nav-link-row .nav-link-main {
    background: linear-gradient(90deg, rgba(45, 212, 191, 0.25) 0%, rgba(56, 189, 248, 0.12) 100%);
    color: #5eead4;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #2dd4bf;
}

.nav-item.active > .nav-link-row .nav-submenu-toggle {
    color: #5eead4;
}

.nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1.125rem;
}

.nav-text {
    flex: 1;
}

.nav-badge {
    background: var(--danger);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-weight: 600;
}

.nav-arrow {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
    margin-left: auto;
}

.nav-link-row {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-radius: var(--border-radius);
}

.nav-link-row .nav-link-main {
    flex: 1;
    min-width: 0;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
}

.nav-submenu-toggle {
    flex: 0 0 auto;
    width: 2.75rem;
    border: none;
    background: transparent;
    color: rgba(248, 250, 252, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    transition: var(--transition);
    padding: 0;
    -webkit-appearance: none;
    appearance: none;
    background-image: none;
    font: inherit;
    line-height: 1;
}

.nav-submenu-toggle:hover,
.nav-submenu-toggle:focus-visible {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
    outline: none;
}

.nav-submenu-toggle .nav-arrow {
    transition: transform 0.25s ease;
    font-size: 0.75rem;
}

.nav-item-has-children.active .nav-submenu-toggle .nav-arrow {
    transform: rotate(180deg);
}

.nav-submenu {
    list-style: none;
    list-style-type: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-item-has-children.active .nav-submenu {
    max-height: 500px;
    padding-top: 0.5rem;
}

.nav-submenu-item {
    margin-bottom: 0.25rem;
}

.nav-submenu-link {
    display: block;
    padding: 0.5rem 1rem 0.5rem 3rem;
    color: rgba(248, 250, 252, 0.6);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    font-size: 0.875rem;
}

.nav-submenu-link:hover {
    background-color: rgba(255, 255, 255, 0.06);
    color: #99f6e4;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.06);
}

.sidebar-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #14b8a6, #0ea5e9);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 0.75rem;
    color: rgba(248, 250, 252, 0.55);
    text-transform: capitalize;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

/* Main Content Area */
.main-wrapper main {
    flex: 1;
    padding: 2rem;
    overflow-x: hidden;
}

/* Top Bar */
.topbar {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: var(--shadow-sm);
    overflow: visible;
}

.topbar-account {
    position: relative;
    overflow: visible;
    z-index: 1;
}

.topbar-account:has(.dropdown-menu.show) {
    z-index: 1080;
}

.topbar-account .dropdown-menu {
    z-index: 1080;
    max-height: min(85vh, 32rem);
    overflow-y: auto;
}

/* Özel yuvarlak hesap düğmesi: Bootstrap okunu gizle (kendi chevron’umuz var) */
.topbar-account-btn.dropdown-toggle::after {
    display: none !important;
    content: none !important;
    margin: 0 !important;
    border: 0 !important;
}

.topbar-account-btn {
    -webkit-appearance: none;
    appearance: none;
    background-image: none;
}

.topbar-account-btn:focus-visible {
    box-shadow: 0 0 0 0.2rem rgba(15, 118, 110, 0.35);
}

.topbar-account-avatar {
    width: 2.25rem;
    height: 2.25rem;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.topbar-toggle:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.topbar-search {
    position: relative;
    max-width: 400px;
    width: 100%;
}

.topbar-search input {
    width: 100%;
    padding: 0.625rem 1rem 0.625rem 2.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.topbar-search i {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    overflow: visible;
    position: relative;
    z-index: 1;
}

.topbar-user {
    line-height: 1.2;
}

.topbar-item {
    position: relative;
    cursor: pointer;
}

.topbar-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--text-secondary);
    transition: var(--transition);
}

.topbar-icon:hover {
    background: var(--primary);
    color: white;
}

.topbar-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background: var(--danger);
    color: white;
    font-size: 0.625rem;
    padding: 0.125rem 0.375rem;
    border-radius: 9999px;
    font-weight: 600;
}

/* Breadcrumbs */
.breadcrumb {
    background: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: var(--primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-item:not(:last-child)::after {
    content: '/';
    color: var(--text-muted);
    margin-left: 0.5rem;
}

/* Page Header */
.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
}

.page-subtitle {
    color: var(--text-secondary);
    margin: 0;
}

/* Advanced Search & Filters */
.search-filters {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

/* Advanced Tables */
.table-wrapper {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-toolbar {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.table-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.table-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

.chart-card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

/* Widgets */
.widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.widget {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    padding: 1.5rem;
    transition: var(--transition);
}

.widget:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.widget-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.widget-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.widget-content {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.widget-footer {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Quick Actions */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text-primary);
    transition: var(--transition);
}

.quick-action:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--primary);
}

.quick-action-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gray-100);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.quick-action-title {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

/* Notifications */
.notification-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    width: 320px;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    max-height: 400px;
    overflow-y: auto;
    display: none;
}

.notification-dropdown.show {
    display: block;
}

.notification-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.notification-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0;
}

.notification-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notification-item {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: var(--transition);
}

.notification-item:hover {
    background: var(--gray-50);
}

.notification-item.unread {
    background: rgba(37, 99, 235, 0.05);
}

.notification-content {
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Responsive Improvements */
@media (max-width: 768px) {
    main {
        padding: 1rem;
    }
    
    .topbar {
        padding: 1rem;
    }
    
    .topbar-search {
        display: none;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .widget-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
    }
}
