/* public/assets/css/app.css — MediCore HMS */

:root {
    --sidebar-width: 260px;
    --sidebar-bg: #0f172a;
    --sidebar-text: #94a3b8;
    --sidebar-active: #3b82f6;
    --sidebar-hover: #1e293b;
    --topbar-h: 60px;
    --primary: #3b82f6;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --purple: #8b5cf6;
    --teal: #14b8a6;
    --pink: #ec4899;
    --body-bg: #f1f5f9;
    --card-radius: 12px;
}

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

body { font-family: 'Segoe UI', system-ui, sans-serif; background: var(--body-bg); color: #1e293b; }

/* ── Sidebar ─────────────────────────────────────── */
.sidebar {
    position: fixed; top: 0; left: 0; height: 100vh;
    width: var(--sidebar-width); background: var(--sidebar-bg);
    overflow-y: auto; z-index: 1000; transition: transform .25s ease;
    display: flex; flex-direction: column;
}
.sidebar-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 16px; color: #fff; font-weight: 700;
    font-size: .95rem; border-bottom: 1px solid #1e293b;
    line-height: 1.3;
}
.sidebar-brand i { font-size: 1.6rem; color: var(--primary); flex-shrink: 0; }
.sidebar-nav { list-style: none; padding: 12px 0; flex: 1; }
.sidebar-nav .nav-item a {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 20px; color: var(--sidebar-text);
    text-decoration: none; font-size: .875rem;
    transition: all .15s; border-left: 3px solid transparent;
}
.sidebar-nav .nav-item a:hover,
.sidebar-nav .nav-item.active a {
    background: var(--sidebar-hover); color: #fff;
    border-left-color: var(--sidebar-active);
}
.sidebar-nav .nav-item a i { font-size: 1.05rem; width: 20px; text-align: center; }

/* ── Main Content ────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh; display: flex; flex-direction: column;
    transition: margin-left .25s ease;
}
.main-content.collapsed { margin-left: 0; }
.sidebar.collapsed { transform: translateX(-100%); }

/* ── Topbar ──────────────────────────────────────── */
.topbar {
    height: var(--topbar-h); background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; position: sticky; top: 0; z-index: 100;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.topbar-right { display: flex; align-items: center; gap: 12px; }

/* ── Page Content ────────────────────────────────── */
.page-content { padding: 24px; flex: 1; }
.page-header { margin-bottom: 20px; }
.page-header h4 { font-size: 1.4rem; font-weight: 700; color: #0f172a; }
.page-footer { background: #fff; border-top: 1px solid #e2e8f0; }

/* ── Stat Cards ──────────────────────────────────── */
.stat-card {
    border-radius: var(--card-radius); padding: 20px;
    display: flex; align-items: center; gap: 16px;
    color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.stat-icon { font-size: 2rem; opacity: .85; }
.stat-body h3 { font-size: 1.65rem; font-weight: 800; line-height: 1; }
.stat-body p  { font-size: .78rem; opacity: .9; margin-top: 4px; }

.stat-blue   { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.stat-green  { background: linear-gradient(135deg, #22c55e, #16a34a); }
.stat-orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.stat-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.stat-red    { background: linear-gradient(135deg, #ef4444, #dc2626); }
.stat-yellow { background: linear-gradient(135deg, #f59e0b, #d97706); }
.stat-teal   { background: linear-gradient(135deg, #14b8a6, #0d9488); }
.stat-pink   { background: linear-gradient(135deg, #ec4899, #db2777); }

/* ── Cards ───────────────────────────────────────── */
.card { border: none; border-radius: var(--card-radius); box-shadow: 0 1px 6px rgba(0,0,0,.07); }
.card-header { background: #fff; border-bottom: 1px solid #f1f5f9; border-radius: var(--card-radius) var(--card-radius) 0 0 !important; padding: 14px 20px; font-size: .9rem; }
.card-body  { padding: 20px; }

/* ── Tables ──────────────────────────────────────── */
.table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: #64748b; font-weight: 600; }
.table td  { font-size: .875rem; vertical-align: middle; }
.table-hover tbody tr:hover { background: #f8fafc; }

/* ── Forms ───────────────────────────────────────── */
.form-label { font-size: .85rem; font-weight: 600; color: #374151; }
.form-control, .form-select {
    border-radius: 8px; border: 1px solid #d1d5db;
    font-size: .875rem; padding: 9px 13px;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* ── Badges ──────────────────────────────────────── */
.badge { font-size: .72rem; padding: .35em .6em; border-radius: 6px; font-weight: 600; }

/* ── Status Badges ───────────────────────────────── */
.status-scheduled  { background: #dbeafe; color: #1d4ed8; }
.status-confirmed  { background: #d1fae5; color: #065f46; }
.status-completed  { background: #dcfce7; color: #166534; }
.status-cancelled  { background: #fee2e2; color: #991b1b; }
.status-in_progress{ background: #fef3c7; color: #92400e; }
.status-pending    { background: #fef9c3; color: #854d0e; }
.status-paid       { background: #d1fae5; color: #065f46; }
.status-partial    { background: #ffedd5; color: #9a3412; }
.status-admitted   { background: #dbeafe; color: #1e40af; }
.status-discharged { background: #f3f4f6; color: #374151; }

/* ── Auth Pages ──────────────────────────────────── */
.auth-wrapper {
    min-height: 100vh; display: flex;
    background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 60%, #0f172a 100%);
}
.auth-card {
    background: #fff; border-radius: 20px;
    padding: 48px 40px; width: 100%; max-width: 440px;
    box-shadow: 0 24px 80px rgba(0,0,0,.3);
    margin: auto;
}
.auth-logo { font-size: 2.5rem; color: var(--primary); }
.auth-title { font-size: 1.5rem; font-weight: 800; }
.auth-subtitle { color: #64748b; font-size: .875rem; }

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .page-content { padding: 16px; }
    .stat-card { padding: 14px; }
    .stat-body h3 { font-size: 1.3rem; }
}

/* ── Utilities ───────────────────────────────────── */
.cursor-pointer { cursor: pointer; }
.text-truncate-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.border-dashed { border-style: dashed !important; }
.rounded-xl { border-radius: 16px !important; }
.shadow-sm-hover:hover { box-shadow: 0 4px 15px rgba(0,0,0,.1) !important; }

/* ── Print ───────────────────────────────────────── */
@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main-content { margin-left: 0 !important; }
    .card { box-shadow: none !important; }
}
