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

:root {
    /* Premium Color Palette */
    --brand-primary: #4F46E5; /* Indigo 600 */
    --brand-primary-hover: #4338CA; /* Indigo 700 */
    --brand-secondary: #0ea5e9; /* Sky 500 */
    --sidebar-bg: #0f172a; /* Slate 900 */
    --sidebar-hover: #1e293b; /* Slate 800 */
    --sidebar-active: #334155; /* Slate 700 */
    --sidebar-text: #94a3b8; /* Slate 400 */
    --sidebar-text-active: #ffffff;
    
    --bg-main: #f8fafc; /* Slate 50 */
    --card-bg: #ffffff;
    
    --text-primary: #0f172a; /* Slate 900 */
    --text-secondary: #475569; /* Slate 600 */
    --text-muted: #94a3b8; /* Slate 400 */
    
    --border-color: #e2e8f0; /* Slate 200 */
    --input-border: #cbd5e1; /* Slate 300 */
    --input-focus-ring: rgba(79, 70, 229, 0.2);
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --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);
    
    --sidebar-width: 280px;
    --header-height: 70px;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-weight: 600;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Sidebar Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-lg);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.brand-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-logo i {
    color: var(--brand-primary);
    font-size: 1.5rem;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 1rem;
}

.menu-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: var(--sidebar-text);
    margin: 1.5rem 0 0.5rem 1rem;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-weight: 500;
}

.nav-link i {
    font-size: 1.25rem;
    color: var(--sidebar-text);
    transition: color 0.2s ease;
}

.nav-link:hover {
    background-color: var(--sidebar-hover);
    color: var(--sidebar-text-active);
}

.nav-link:hover i {
    color: var(--sidebar-text-active);
}

.nav-link.active {
    background-color: var(--sidebar-active);
    color: var(--sidebar-text-active);
}

.nav-link.active i {
    color: var(--brand-primary);
}

/* Main Content Area */
.main-wrapper {
    flex: 1;
    min-width: 0;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.topbar {
    height: var(--header-height);
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.topbar-search {
    position: relative;
    width: 300px;
}

.topbar-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.topbar-search input {
    width: 100%;
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    border-radius: 9999px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-main);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.topbar-search input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--input-focus-ring);
    background-color: #fff;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

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

.page-content {
    padding: 2rem;
    flex: 1;
}

/* Premium Cards */
.card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
    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: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h1, .card-header h2, .card-header h3, .card-header h4, .card-header h5 {
    margin: 0;
    font-size: 1.125rem;
}

.card-body {
    padding: 1.5rem;
}

/* Premium Tables */
.table-responsive {
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    background: #fff;
    overflow-x: auto;
    overflow-y: hidden;
}

.table {
    margin-bottom: 0;
    vertical-align: middle;
}

.table thead th {
    background-color: var(--bg-main);
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    border-top: none;
}

.table tbody td {
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.875rem;
}

.table tbody tr:hover {
    background-color: var(--bg-main);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

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

.btn-primary:hover {
    background-color: var(--brand-primary-hover);
    border-color: var(--brand-primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-light {
    background-color: #fff;
    border-color: var(--input-border);
    color: var(--text-primary);
}

.btn-light:hover {
    background-color: var(--bg-main);
    border-color: var(--input-border);
}

/* Form Controls */
.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    border: 1px solid var(--input-border);
    border-radius: var(--radius-md);
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
    background-color: #fff;
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px var(--input-focus-ring);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Badges */
.badge {
    padding: 0.35em 0.65em;
    font-weight: 500;
    border-radius: 9999px;
    letter-spacing: 0.02em;
}

.bg-success-subtle { background-color: #dcfce7 !important; color: #166534 !important; }
.bg-warning-subtle { background-color: #fef9c3 !important; color: #854d0e !important; }
.bg-primary-subtle { background-color: #e0e7ff !important; color: #3730a3 !important; }
.bg-danger-subtle { background-color: #fee2e2 !important; color: #991b1b !important; }

/* Dashboard Cards */
.stat-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.stat-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}
.stat-content h3 {
    margin: 0 0 0.25rem 0;
    font-size: 1.75rem;
    font-weight: 700;
}
.stat-content p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}