/* ============================================================
   PHARMACY MANAGEMENT SYSTEM — Global Stylesheet
   ============================================================ */

:root {
    --brand:          #0d9488;
    --brand-dark:     #0f766e;
    --brand-light:    #ccfbf1;
    --sidebar-width:  260px;
    --navbar-height:  64px;
    --body-bg:        #f1f5f9;
    --card-radius:    14px;
    --shadow-sm:      0 1px 3px rgba(15, 23, 42, .08);
    --shadow-md:      0 4px 16px rgba(15, 23, 42, .08);
    --shadow-lg:      0 12px 32px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, 'Noto Sans Devanagari', sans-serif;
    background: var(--body-bg);
    color: #0f172a;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-body { margin: 0; overflow-x: hidden; }

.auth-wrapper {
    display: flex;
    min-height: 100vh;
}

.auth-brand {
    flex: 1 1 52%;
    background: linear-gradient(140deg, #0f766e 0%, #0d9488 45%, #14b8a6 100%);
    color: #fff;
    display: flex;                 ⬅️ यो line थप्नुहोस्
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}
}

.auth-brand::after {
    content: '';
    position: absolute;
    width: 520px; height: 520px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .07);
    top: -160px; right: -160px;
}

.auth-brand-inner { position: relative; z-index: 1; max-width: 440px; }

.brand-logo {
    width: 76px; height: 76px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .25);
    display: grid; place-items: center;
    font-size: 34px;
    margin-bottom: 26px;
    backdrop-filter: blur(6px);
}

.brand-logo-sm { width: 60px; height: 60px; font-size: 26px; background: var(--brand-light); color: var(--brand-dark); }

.auth-brand h1 { font-size: 2.1rem; font-weight: 700; margin-bottom: 6px; }
.brand-tagline { opacity: .85; margin-bottom: 34px; font-size: .95rem; letter-spacing: .4px; }

.brand-features { list-style: none; padding: 0; margin: 0 0 34px; }
.brand-features li {
    display: flex; align-items: center; gap: 12px;
    padding: 9px 0; font-size: .94rem; opacity: .95;
}
.brand-features li i {
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    display: grid; place-items: center; font-size: 11px;
}

.brand-footer { font-size: .82rem; opacity: .75; display: flex; align-items: center; gap: 8px; }

.auth-form-side {
    flex: 1 1 48%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 24px;
    background: #fff;
}

.auth-card { width: 100%; max-width: 420px; }
.auth-title { font-size: 1.75rem; font-weight: 700; margin-bottom: 6px; }
.auth-subtitle { color: #64748b; margin-bottom: 28px; font-size: .95rem; }

.auth-submit { padding: 13px; font-weight: 600; border-radius: 10px; letter-spacing: .3px; }

.auth-meta {
    margin-top: 30px; padding-top: 20px;
    border-top: 1px solid #e2e8f0;
    text-align: center; font-size: .78rem; color: #94a3b8;
}

.input-group-text { background: #f8fafc; border-right: 0; color: #64748b; }
.input-group .form-control { border-left: 0; }
.input-group .form-control:focus { box-shadow: none; border-color: #ced4da; }
.input-group:focus-within .input-group-text { border-color: var(--brand); color: var(--brand); }
.input-group:focus-within .form-control { border-color: var(--brand); }

.btn-primary {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
    --bs-btn-active-bg: var(--brand-dark);
    --bs-btn-active-border-color: var(--brand-dark);
}

.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .2rem rgba(13, 148, 136, .15);
}

/* ============================================================
   APP SHELL
   ============================================================ */
.app-shell { display: flex; min-height: 100vh; }

.app-sidebar {
    width: var(--sidebar-width);
    background: #0f172a;
    color: #cbd5e1;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: transform .25s ease;
}

.sidebar-brand {
    display: flex; align-items: center; gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
    min-height: var(--navbar-height);
}

.sidebar-brand-icon {
    width: 40px; height: 40px; border-radius: 11px;
    background: linear-gradient(135deg, var(--brand), #14b8a6);
    display: grid; place-items: center; color: #fff; font-size: 18px;
    flex-shrink: 0;
}

.sidebar-brand-text { display: flex; flex-direction: column; line-height: 1.25; overflow: hidden; }
.sidebar-brand-text .name { font-weight: 700; color: #fff; font-size: .95rem; }
.sidebar-brand-text .sub { font-size: .72rem; color: #64748b; }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 14px 12px 24px; }

.sidebar-section {
    font-size: .68rem; text-transform: uppercase; letter-spacing: 1px;
    color: #475569; padding: 16px 12px 8px; font-weight: 700;
}

.sidebar-link {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    border-radius: 10px;
    color: #cbd5e1;
    font-size: .9rem;
    margin-bottom: 3px;
    transition: background .15s, color .15s;
}

.sidebar-link i { width: 18px; text-align: center; font-size: .95rem; opacity: .85; }
.sidebar-link:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sidebar-link.active { background: linear-gradient(90deg, var(--brand), #0f766e); color: #fff; box-shadow: 0 4px 14px rgba(13, 148, 136, .35); }
.sidebar-link.active i { opacity: 1; }
.sidebar-link-danger:hover { background: rgba(239, 68, 68, .15); color: #fca5a5; }

.sidebar-note {
    margin: 20px 12px 0;
    padding: 12px 14px;
    background: rgba(13, 148, 136, .12);
    border: 1px solid rgba(13, 148, 136, .25);
    border-radius: 10px;
    font-size: .76rem;
    color: #7dd3fc;
    display: flex; gap: 10px;
}
.sidebar-note strong { color: #fff; }

.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.app-navbar {
    height: var(--navbar-height);
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 22px;
    position: sticky; top: 0; z-index: 1020;
}

.navbar-right { display: flex; align-items: center; gap: 12px; }

.avatar-circle {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--brand), #14b8a6);
    color: #fff; display: grid; place-items: center;
    font-weight: 700; font-size: .82rem; flex-shrink: 0;
}
.avatar-sm { width: 30px; height: 30px; font-size: .75rem; }

.app-content { flex: 1; padding: 24px 22px; }

.app-footer {
    padding: 16px 22px;
    border-top: 1px solid #e2e8f0;
    background: #fff;
    font-size: .8rem;
    color: #64748b;
}

.sidebar-backdrop {
    display: none;
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .5);
    z-index: 1035;
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
    display: flex; flex-wrap: wrap; gap: 14px;
    justify-content: space-between; align-items: center;
    margin-bottom: 22px;
}
.page-title { font-size: 1.4rem; font-weight: 700; margin: 0 0 2px; }
.page-subtitle { color: #64748b; font-size: .88rem; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb { font-size: .82rem; }
.breadcrumb a { color: var(--brand); }

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-card {
    background: #fff;
    border-radius: var(--card-radius);
    padding: 18px;
    display: flex; align-items: center; gap: 14px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
    transition: transform .18s, box-shadow .18s;
    height: 100%;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.stat-icon {
    width: 48px; height: 48px; border-radius: 13px;
    display: grid; place-items: center;
    font-size: 19px; flex-shrink: 0;
}

.stat-value { font-size: 1.45rem; font-weight: 700; line-height: 1.1; }
.stat-label { font-size: .78rem; color: #64748b; margin-top: 2px; }

.stat-primary .stat-icon { background: #dbeafe; color: #2563eb; }
.stat-success .stat-icon { background: #d1fae5; color: #059669; }
.stat-info    .stat-icon { background: #cffafe; color: #0891b2; }
.stat-danger  .stat-icon { background: #fee2e2; color: #dc2626; }
.stat-warning .stat-icon { background: #fef3c7; color: #d97706; }

/* ============================================================
   CARDS / TABLES
   ============================================================ */
.card { border-radius: var(--card-radius); }
.card-header { border-bottom: 1px solid #f1f5f9 !important; }

.table > :not(caption) > * > * { padding: .72rem .75rem; }
.table thead th {
    font-size: .74rem; text-transform: uppercase; letter-spacing: .5px;
    color: #64748b; font-weight: 700; border-bottom: 1px solid #e2e8f0;
}
.table-hover tbody tr:hover { background: #f8fafc; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
    .app-sidebar { transform: translateX(-100%); }
    .app-sidebar.show { transform: translateX(0); }
    .app-main { margin-left: 0; }
    .sidebar-backdrop.show { display: block; }
    .app-content { padding: 18px 14px; }
    .app-navbar { padding: 0 14px; }
}

@media (max-width: 575.98px) {
    .auth-form-side { padding: 24px 16px; }
    .auth-title { font-size: 1.45rem; }
    .page-title { font-size: 1.2rem; }
    .stat-value { font-size: 1.2rem; }
    .stat-icon { width: 42px; height: 42px; font-size: 16px; }
}