@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --bg: #F8FAFC;
    --brand-primary: #4F46E5;
    --brand-secondary: #7C3AED;
    --sidebar-bg: #ffffff;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-light: #E2E8F0;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --hover-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.wrapper {
    display: flex;
    flex: 1 1 auto;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

.sidebar {
    width: 260px;
    min-width: 260px;
    flex-shrink: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    z-index: 1000;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
    overflow-y: auto;
}

.nav-item-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    gap: 12px;
}

.nav-item-link:hover, .nav-item-link.active {
    background: rgba(79, 70, 229, 0.05);
    color: var(--brand-primary);
    border-right: 3px solid var(--brand-primary);
}

.nav-item-link i {
    font-size: 1.1rem;
}

.main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: var(--bg);
}

/* Topbar */
.topbar {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
}

/* Cards */
.card {
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    background: #ffffff;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hover-shadow);
}

.metric-card .card-body {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
    line-height: 1;
}

.metric-info p {
    margin: 0.5rem 0 0 0;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 500;
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(79,70,229,0.1), rgba(124,58,237,0.1));
    color: var(--brand-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
    border: none;
    box-shadow: 0 4px 6px rgba(79, 70, 229, 0.25);
    font-weight: 500;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-primary:hover {
    box-shadow: 0 6px 12px rgba(79, 70, 229, 0.35);
    transform: translateY(-1px);
}

.btn-outline-primary {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    font-weight: 500;
    border-radius: 8px;
}

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

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: var(--text-muted);
    border-bottom-width: 1px;
    padding: 1rem 0.75rem;
    background: #f8fafc;
}

.table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
}

.thumb {
    width: 48px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--border-light);
}

/* Settings Tabs */
.settings-tabs {
    border-bottom: 2px solid #e2e8f0;
    gap: 0.25rem;
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: thin;
}

.settings-tabs::-webkit-scrollbar {
    height: 4px;
}

.settings-tabs::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.settings-tabs .nav-item {
    flex-shrink: 0;
}

.settings-tabs .nav-link {
    color: #64748b;
    font-weight: 600;
    border: none;
    padding: 0.6rem 1.1rem;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    white-space: nowrap;
    border-radius: 6px 6px 0 0;
    transition: all 0.2s ease-in-out;
}

.settings-tabs .nav-link:hover {
    color: #2563eb;
    background-color: rgba(37, 99, 235, 0.05);
}

.settings-tabs .nav-link.active {
    color: #2563eb !important;
    border-bottom: 3px solid #2563eb;
    background: #ffffff;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.03);
}

.saved-scroll {
    max-height: 400px;
    overflow-y: auto;
    padding-right: 5px;
}

.saved-scroll::-webkit-scrollbar {
    width: 6px;
}
.saved-scroll::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

/* Form Controls */
.form-control, .form-select {
    border-color: var(--border-light);
    border-radius: 8px;
    padding: 0.6rem 1rem;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* Footer */
.app-footer {
    padding: 1.5rem 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
    border-top: 1px solid var(--border-light);
    margin-top: auto;
}

.app-footer a {
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 600;
}

.app-footer a:hover {
    text-decoration: underline;
}

/* Empty State */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
}

.empty-state i {
    font-size: 4rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
}

