/* ==========================================================================
   Blueopth Health Care — Admin panel
   ========================================================================== */

:root {
    --bo-blue: #075985;
    --bo-dark: #03263a;
    --bo-teal: #0f766e;
    --bo-cyan: #14b8a6;
    --bo-ink: #123047;
    --bo-muted: #64809a;
    --bo-line: #e2ecf3;
    --bo-bg: #f4f8fb;
    --sidebar-w: 264px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--bo-bg);
    color: var(--bo-ink);
    font-size: 15px;
}

/* Layout ------------------------------------------------------------------ */

.admin-shell {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: var(--sidebar-w);
    flex: 0 0 var(--sidebar-w);
    background: linear-gradient(180deg, var(--bo-dark) 0%, #06344f 100%);
    color: #cfe3ef;
    display: flex;
    flex-direction: column;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1045;
    overflow-y: auto;
}

.admin-main {
    flex: 1 1 auto;
    min-width: 0;
    margin-left: var(--sidebar-w);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.admin-content {
    padding: 28px;
    flex: 1 1 auto;
}

.admin-footer {
    padding: 16px 28px;
    color: var(--bo-muted);
    font-size: 13px;
    border-top: 1px solid var(--bo-line);
    background: #fff;
}

/* Sidebar ----------------------------------------------------------------- */

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar-brand a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #fff;
}

/* Real brand mark on the white sidebar chip, so the blue artwork stays visible. */
.brand-mark {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 11px;
    object-fit: contain;
    background: #fff;
    padding: 5px;
}

.brand-text strong {
    display: block;
    font-size: 16px;
    line-height: 1.1;
}

.brand-text small {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .09em;
    color: #8fb6cd;
}

.sidebar-close {
    color: #cfe3ef;
    background: rgba(255, 255, 255, .08);
    border: 0;
}

.sidebar-nav {
    padding: 14px 12px 28px;
}

.nav-heading {
    margin: 18px 10px 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #6f96ae;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 12px;
    margin-bottom: 2px;
    border-radius: 9px;
    color: #cfe3ef;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background .15s, color .15s;
}

.nav-item i {
    font-size: 16px;
    width: 18px;
    text-align: center;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.nav-item.active {
    background: linear-gradient(90deg, var(--bo-cyan), rgba(20, 184, 166, .35));
    color: #fff;
    font-weight: 600;
}

/* Topbar ------------------------------------------------------------------ */

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 1030;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 28px;
    background: #fff;
    border-bottom: 1px solid var(--bo-line);
}

.topbar-search {
    position: relative;
    max-width: 320px;
    flex: 1 1 260px;
}

.topbar-search i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--bo-muted);
    pointer-events: none;
}

.topbar-search .form-control {
    padding-left: 34px;
    background: var(--bo-bg);
    border-color: transparent;
    border-radius: 9px;
}

.topbar-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    object-fit: cover;
}

/* Page header ------------------------------------------------------------- */

.page-title {
    margin: 0;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
}

.page-subtitle {
    margin: 4px 0 0;
    color: var(--bo-muted);
    font-size: 14px;
}

/* Cards ------------------------------------------------------------------- */

.admin-card {
    border: 1px solid var(--bo-line);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(18, 48, 71, .04);
}

.admin-card > .card-header {
    background: #fff;
    border-bottom: 1px solid var(--bo-line);
    font-weight: 700;
    padding: 14px 18px;
    border-radius: 14px 14px 0 0;
}

.admin-card > .card-header i {
    color: var(--bo-teal);
}

/* Stat tiles -------------------------------------------------------------- */

.stat-tile {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid var(--bo-line);
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: transform .15s, box-shadow .15s;
}

.stat-tile:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(7, 89, 133, .10);
    color: inherit;
}

.stat-icon {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    font-size: 20px;
    color: #fff;
}

.stat-value {
    font-size: 24px;
    font-weight: 800;
    line-height: 1.1;
}

.stat-label {
    font-size: 12.5px;
    color: var(--bo-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
}

.bg-grad-blue  { background: linear-gradient(135deg, #075985, #0ea5e9); }
.bg-grad-teal  { background: linear-gradient(135deg, #0f766e, #14b8a6); }
.bg-grad-amber { background: linear-gradient(135deg, #b45309, #f59e0b); }
.bg-grad-rose  { background: linear-gradient(135deg, #9f1239, #f43f5e); }
.bg-grad-violet{ background: linear-gradient(135deg, #5b21b6, #8b5cf6); }
.bg-grad-slate { background: linear-gradient(135deg, #334155, #64748b); }

/* Tables ------------------------------------------------------------------ */

.admin-table {
    margin: 0;
}

.admin-table > :not(caption) > * > * {
    padding: 12px 14px;
    vertical-align: middle;
}

.admin-table thead th {
    background: #f7fbfd;
    border-bottom: 1px solid var(--bo-line);
    font-size: 11.5px;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: var(--bo-muted);
    font-weight: 700;
    white-space: nowrap;
}

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

.table-thumb {
    width: 46px;
    height: 46px;
    border-radius: 9px;
    object-fit: cover;
    background: var(--bo-bg);
    border: 1px solid var(--bo-line);
}

.empty-state {
    padding: 56px 20px;
    text-align: center;
    color: var(--bo-muted);
}

.empty-state i {
    font-size: 42px;
    color: #b9d3e3;
    display: block;
    margin-bottom: 10px;
}

/* Forms ------------------------------------------------------------------- */

.form-label {
    font-weight: 600;
    font-size: 13.5px;
    margin-bottom: 5px;
}

.form-control,
.form-select {
    border-color: #d6e4ee;
    border-radius: 9px;
    padding: 9px 12px;
    font-size: 14.5px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--bo-cyan);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, .15);
}

.form-text {
    font-size: 12.5px;
    color: var(--bo-muted);
}

.btn {
    border-radius: 9px;
    font-weight: 600;
    font-size: 14.5px;
}

.btn-primary {
    background: var(--bo-blue);
    border-color: var(--bo-blue);
}

.btn-primary:hover,
.btn-primary:focus {
    background: #064a70;
    border-color: #064a70;
}

.btn-teal {
    background: var(--bo-teal);
    border-color: var(--bo-teal);
    color: #fff;
}

.btn-teal:hover {
    background: #0c6057;
    border-color: #0c6057;
    color: #fff;
}

/* Upload previews --------------------------------------------------------- */

.upload-preview {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.upload-preview img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 9px;
    border: 1px solid var(--bo-line);
    background: #fff;
}

/* Media grid (gallery / product images) ----------------------------------- */

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
    gap: 14px;
}

.media-item {
    border: 1px solid var(--bo-line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.media-item img {
    width: 100%;
    height: 132px;
    object-fit: cover;
    display: block;
}

.media-item .media-body {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.media-item .form-control {
    font-size: 13px;
    padding: 6px 8px;
}

/* Summernote -------------------------------------------------------------- */

.note-editor.note-frame {
    border-color: #d6e4ee;
    border-radius: 10px;
    overflow: hidden;
}

.note-editor .note-toolbar {
    background: #f7fbfd;
    border-bottom: 1px solid var(--bo-line);
}

.note-editor .note-statusbar {
    background: #f7fbfd;
}

/* Login ------------------------------------------------------------------- */

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(900px 500px at 10% -10%, rgba(20, 184, 166, .25), transparent 60%),
        radial-gradient(800px 500px at 110% 110%, rgba(7, 89, 133, .30), transparent 60%),
        var(--bo-dark);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 18px;
    padding: 34px;
    box-shadow: 0 24px 60px rgba(3, 38, 58, .35);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 22px;
}

/* Responsive -------------------------------------------------------------- */

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(3, 38, 58, .5);
    z-index: 1040;
}

.sidebar-backdrop.show {
    display: block;
}

@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform .22s ease;
    }

    .admin-sidebar.open {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-content,
    .admin-topbar,
    .admin-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Admin login logo */

.login-brand {
    justify-content: center;
    margin-bottom: 8px;
}

.login-logo {
    height: 96px;
    width: auto;
}
