@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --white: #ffffff;
    --black: #000000;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-600: #525252;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--white);
    color: var(--black);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Layout Container */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--white);
    border-right: 1px solid var(--gray-100);
    padding: 32px 0;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 100;
}

.logo {
    padding: 0 24px 40px;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: var(--black);
    text-decoration: none;
    display: block;
}

.nav-menu {
    list-style: none;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s ease;
    border-left: 2px solid transparent;
}

.nav-link:hover {
    color: var(--black);
    background: var(--gray-50);
}

.nav-link.active {
    color: var(--black);
    background: var(--gray-50);
    border-left-color: var(--black);
}

.nav-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 260px;
    background: var(--white);
}

/* Top Navbar */
.top-navbar {
    height: 72px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.search-bar {
    flex: 0 0 400px;
}

.search-input {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--black);
}

.search-input::placeholder {
    color: var(--gray-400);
}

.navbar-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.icon-button {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--gray-200);
    background: var(--white);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.icon-button:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.icon-button svg {
    width: 20px;
    height: 20px;
    stroke: var(--black);
    stroke-width: 2;
    fill: none;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 6px 12px 6px 6px;
    border-radius: 8px;
    transition: background 0.15s ease;
}

.admin-profile:hover {
    background: var(--gray-50);
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--black);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
}

.admin-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.admin-role {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.2;
}

/* Content Container */
.content-container {
    padding: 40px;
    max-width: 1600px;
}

/* Page Header */
.page-header {
    margin-bottom: 40px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

.page-subtitle {
    font-size: 15px;
    color: var(--gray-600);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 48px;
}

.stat-card {
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: 12px;
    padding: 28px;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: var(--gray-300);
    transform: translateY(-2px);
}

.stat-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1px;
    line-height: 1;
}

.stat-change {
    font-size: 13px;
    color: var(--gray-600);
    margin-top: 12px;
}

/* Section */
.section {
    margin-bottom: 48px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    border: 1px solid var(--black);
    background: var(--black);
    color: var(--white);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    background: var(--gray-600);
    border-color: var(--gray-600);
}

/* Table Styles */
.table-container {
    background: var(--white);
    border: 1px solid var(--gray-100);
    border-radius: 12px;
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100);
}

th {
    padding: 16px 24px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-600);
}

td {
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-100);
    font-size: 14px;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: var(--gray-50);
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}