:root {
    /* Palette matching screenshots */
    --primary: #0d9488; /* Teal */
    --primary-hover: #0f766e;
    --primary-light: #ccfbf1;
    
    --sidebar-bg: #0f172a; /* Dark Navy */
    --sidebar-text: #94a3b8;
    --sidebar-active: #1e293b;
    --sidebar-active-text: #ffffff;
    
    --bg-body: #f1f5f9;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    
    /* Spacing & Radius */
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    
    --sidebar-width: 260px;
    --header-height: 64px;
}

* { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', system-ui, sans-serif; }
body { background-color: var(--bg-body); color: var(--text-main); }

/* Layout Utilities */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-4 { gap: 1rem; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }

/* Buttons */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    padding: 0.5rem 1rem; border-radius: var(--radius-md); font-weight: 500;
    cursor: pointer; border: 1px solid transparent; transition: all 0.2s; font-size: 0.875rem;
    text-decoration: none;
}
.btn-primary { background-color: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--primary-hover); }
.btn-outline { background-color: transparent; border-color: var(--border); color: var(--text-main); }
.btn-sm { padding: 0.25rem 0.75rem; font-size: 0.75rem; }

/* Inputs */
.form-input {
    width: 100%; padding: 0.625rem 1rem; border-radius: var(--radius-md);
    border: 1px solid var(--border); background-color: #fff; color: var(--text-main);
    font-size: 0.875rem; outline: none; transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }

/* Cards */
.card { background: var(--bg-card); border-radius: var(--radius-xl); box-shadow: var(--shadow-sm); border: 1px solid var(--border); padding: 1.5rem; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.card-title { font-size: 1.125rem; font-weight: 600; color: var(--text-main); }

/* Badges */
.badge { padding: 0.25rem 0.75rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; text-transform: capitalize; }
.badge-success { background: #dcfce7; color: #166534; }
.badge-warning { background: #fef9c3; color: #854d0e; }
.badge-info { background: #dbeafe; color: #1e40af; }
.badge-danger { background: #fee2e2; color: #991b1b; }

/* Tables */
.table-container { width: 100%; overflow-x: auto; background: white; border-radius: var(--radius-lg); border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.875rem; }
th { background: #f8fafc; color: var(--text-muted); font-weight: 600; padding: 0.75rem 1.5rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border); color: var(--text-main); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #f8fafc; }

/* Sidebar */
.sidebar { width: var(--sidebar-width); background: var(--sidebar-bg); display: flex; flex-direction: column; border-right: 1px solid #1e293b; }
.sidebar-logo { height: var(--header-height); display: flex; align-items: center; padding: 0 1.5rem; font-size: 1.25rem; font-weight: 700; color: white; border-bottom: 1px solid #1e293b; }
.nav-item { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 1.5rem; color: var(--sidebar-text); text-decoration: none; font-size: 0.875rem; transition: all 0.2s; border-left: 3px solid transparent; }
.nav-item:hover { color: white; background: rgba(255,255,255,0.05); }
.nav-item.active { background: var(--sidebar-active); color: var(--sidebar-active-text); border-left-color: var(--primary); }

/* App Shell */
.app-shell { display: flex; height: 100vh; overflow: hidden; }
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-body); }
.topbar { height: var(--header-height); background: white; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 0 1.5rem; }
.content-scroll { flex: 1; overflow-y: auto; padding: 2rem; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar { position: fixed; left: -100%; height: 100%; z-index: 40; transition: left 0.3s; }
    .sidebar.open { left: 0; }
    .table-container { display: none; } /* Hide tables on mobile */
    .mobile-cards { display: flex; flex-direction: column; gap: 1rem; }
    .mobile-card { background: white; border-radius: var(--radius-lg); padding: 1rem; border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
    .desktop-only { display: none; }
}
@media (min-width: 769px) {
    .mobile-cards { display: none; }
}
