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

:root {
    --admin-primary: #0284c7;
    --admin-bg: #f1f5f9;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active: #ffffff;
    --sidebar-hover: #1e293b;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Layout */
.admin-sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    border-bottom: 1px solid #1e293b;
}

.sidebar-header img {
    height: 38px;
    width: auto;
}

.sidebar-brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: #ffffff;
    font-size: 1.1rem;
}

.sidebar-menu {
    list-style: none;
    padding: 1.2rem 0.8rem;
    flex-grow: 1;
    overflow-y: auto;
}

.menu-item {
    margin-bottom: 0.3rem;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    color: var(--sidebar-text);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.menu-link:hover, .menu-link.active {
    background: var(--sidebar-hover);
    color: var(--sidebar-active);
}

.menu-link.active {
    background: var(--admin-primary);
}

.menu-badge {
    margin-left: auto;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
}

.admin-main {
    margin-left: 260px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

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

.topbar-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

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

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

/* Dashboard Cards */
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dash-card {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.dash-val {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-main);
}

.dash-lbl {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
}

.dash-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: #e0f2fe;
    color: #0284c7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

/* Tables & Cards */
.panel-card {
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0,0,0,0.03);
    margin-bottom: 2rem;
    overflow: hidden;
}

.panel-header {
    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;
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    background: #f8fafc;
    padding: 0.85rem 1.25rem;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
}

.admin-table td {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.92rem;
    vertical-align: middle;
}

.admin-table tr:hover {
    background: #f8fafc;
}

.table-img {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    object-fit: cover;
}

/* Forms & Buttons */
.btn-admin {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    font-size: 0.88rem;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-admin-primary {
    background: var(--admin-primary);
    color: #ffffff;
}

.btn-admin-primary:hover {
    background: #0369a1;
}

.btn-admin-danger {
    background: #fee2e2;
    color: #dc2626;
}

.btn-admin-danger:hover {
    background: #fca5a5;
}

.btn-admin-secondary {
    background: #e2e8f0;
    color: #334155;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease;
}

.form-control:focus {
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

textarea.form-control {
    min-height: 110px;
    resize: vertical;
}

.alert {
    padding: 0.85rem 1.2rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-size: 0.92rem;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}
