@import 'tailwindcss';

@source '../../vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php';
@source '../../storage/framework/views/*.php';

@theme {
    --font-sans: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
        'Segoe UI Symbol', 'Noto Color Emoji';
}

:root {
    --ink: #27283a;
    --muted: #7b7d91;
    --line: #e9e9ef;
    --surface: #ffffff;
    --canvas: #f7f7fa;
    --coral: #ff685b;
    --coral-dark: #ef5549;
    --coral-soft: #fff0ee;
    --violet: #7867d8;
    --violet-soft: #f1efff;
    --mint: #32b79a;
    --mint-soft: #e8faf5;
    --sidebar: #252638;
}

* { box-sizing: border-box; }

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.admin-body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    background: var(--canvas);
    color: var(--ink);
    font-family: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif;
}

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

.sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 30;
    display: flex;
    width: 246px;
    flex-direction: column;
    padding: 25px 18px 18px;
    color: #fff;
    background: var(--sidebar);
    box-shadow: 5px 0 24px rgb(26 27 43 / 8%);
}

.brand { display: flex; align-items: center; gap: 11px; padding: 0 10px 31px; }
.brand-mark {
    display: grid;
    width: 37px;
    height: 37px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 11px;
    background: var(--coral);
    transform: rotate(-4deg);
    box-shadow: 0 6px 16px rgb(255 104 91 / 28%);
}
.brand-mark svg { width: 22px; fill: #fff; transform: rotate(4deg); }
.brand strong { display: block; font-size: 20px; letter-spacing: -.5px; line-height: 1; }
.brand span { display: block; margin-top: 7px; color: #9b9cac; font-size: 8px; font-weight: 600; letter-spacing: 1.5px; }

.main-nav { flex: 1; }
.main-nav > p { margin: 0 12px 10px; color: #76778b; font-size: 9px; font-weight: 700; letter-spacing: 1.2px; }
.nav-item {
    display: flex;
    width: 100%;
    height: 44px;
    align-items: center;
    gap: 13px;
    margin-bottom: 5px;
    padding: 0 12px;
    color: #aeb0c0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    transition: .2s ease;
}
.nav-item:hover { color: #fff; background: rgb(255 255 255 / 5%); }
.nav-item.active { color: #fff; background: #3b3b4e; box-shadow: inset 3px 0 var(--coral); }
.nav-item svg { width: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.nav-count { margin-left: auto; min-width: 22px; padding: 3px 6px; border-radius: 7px; background: #45465a; color: #bfc0cc; font-size: 9px; text-align: center; }
.nav-item.active .nav-count { background: var(--coral); color: #fff; }

.sidebar-help {
    margin: 20px 2px 18px;
    padding: 16px 15px;
    border: 1px solid #404155;
    border-radius: 13px;
    background: #2d2e42;
}
.help-icon { display: grid; width: 26px; height: 26px; margin-bottom: 10px; place-items: center; border-radius: 50%; color: var(--coral); background: #443a46; font-size: 12px; font-weight: 700; }
.sidebar-help strong { font-size: 11px; }
.sidebar-help p { margin: 5px 0 10px; color: #9394a7; font-size: 9px; line-height: 1.5; }
.sidebar-help a { color: var(--coral); font-size: 9px; font-weight: 600; text-decoration: none; }

.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 15px 4px 0; border-top: 1px solid #3a3b4c; }
.avatar, .top-avatar {
    display: grid;
    width: 35px;
    height: 35px;
    place-items: center;
    flex: 0 0 auto;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, #7c6add, #6150bb);
    font-size: 10px;
    font-weight: 700;
}
.sidebar-user > div:nth-child(2) { min-width: 0; flex: 1; }
.sidebar-user strong, .sidebar-user span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { font-size: 10px; }
.sidebar-user span { margin-top: 4px; color: #85869a; font-size: 8px; }
.sidebar-user form { margin: 0; }
.sidebar-user button { color: #9091a2; border: 0; background: transparent; font-size: 16px; }

.admin-main { width: calc(100% - 246px); min-width: 0; margin-left: 246px; }
.topbar {
    display: flex;
    height: 66px;
    align-items: center;
    justify-content: space-between;
    padding: 0 35px;
    border-bottom: 1px solid var(--line);
    background: rgb(255 255 255 / 92%);
    backdrop-filter: blur(10px);
}
.breadcrumb { display: flex; align-items: center; gap: 10px; font-size: 11px; }
.breadcrumb span, .breadcrumb b { color: #a0a1b0; font-weight: 400; }
.breadcrumb strong { color: #55566a; font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.icon-button { position: relative; display: grid; width: 35px; height: 35px; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.icon-button svg { width: 17px; fill: none; stroke: #686a7c; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-button i { position: absolute; top: 6px; right: 7px; width: 5px; height: 5px; border: 1px solid #fff; border-radius: 50%; background: var(--coral); }
.top-avatar { width: 34px; height: 34px; }
.mobile-menu { display: none; border: 0; background: transparent; }
.mobile-menu svg { width: 24px; fill: none; stroke: var(--ink); stroke-width: 2; }

.content { width: min(100%, 1260px); margin: 0 auto; padding: 36px 38px 60px; }
.page-section { display: none; animation: section-in .25s ease; }
.page-section.active { display: block; }
@keyframes section-in { from { opacity: 0; transform: translateY(4px); } }

.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 27px; }
.eyebrow { margin: 0 0 9px; color: var(--coral); font-size: 8px; font-weight: 700; letter-spacing: 1.5px; }
.page-heading h1 { margin: 0; color: #242536; font-size: 27px; font-weight: 600; letter-spacing: -.8px; }
.page-heading h1 span { font-size: 23px; }
.page-heading > div > p:last-child { margin: 8px 0 0; color: var(--muted); font-size: 11px; }
.heading-actions { display: flex; gap: 10px; }
.button {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: .2s ease;
}
.button svg { width: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.button.primary { color: #fff; background: var(--coral); box-shadow: 0 6px 16px rgb(255 104 91 / 20%); }
.button.primary:hover { background: var(--coral-dark); transform: translateY(-1px); }
.button.secondary { color: #5c5d6e; border-color: var(--line); background: #fff; }
.button.secondary:hover { border-color: #d2d2dd; background: #fbfbfd; }

.metrics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; margin-bottom: 18px; }
.metric-card {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 13px;
    padding: 19px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 2px 8px rgb(30 31 47 / 2%);
}
.metric-icon, .quick-icon, .modal-icon { display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; }
.metric-icon { width: 43px; height: 43px; }
.metric-icon svg, .quick-icon svg, .modal-icon svg { width: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.coral { color: var(--coral); background: var(--coral-soft); }
.violet { color: var(--violet); background: var(--violet-soft); }
.mint { color: var(--mint); background: var(--mint-soft); }
.metric-info { min-width: 0; flex: 1; }
.metric-info > span, .metric-info strong, .metric-info small { display: block; }
.metric-info > span { color: #797b8d; font-size: 9px; }
.metric-info strong { margin: 4px 0 3px; color: #2d2e3e; font-size: 22px; line-height: 1; }
.metric-info small { color: #9a9baa; font-size: 8px; }
.metric-info small b { color: var(--mint); font-weight: 600; }
.metric-card > button { align-self: flex-start; color: #b2b3be; border: 0; background: transparent; font-size: 15px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, .8fr); gap: 18px; }
.panel { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); box-shadow: 0 3px 12px rgb(32 33 51 / 2%); }
.panel-heading { display: flex; min-height: 70px; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 20px; border-bottom: 1px solid #eeeeF3; }
.panel-heading h2 { margin: 0; color: #303142; font-size: 13px; font-weight: 600; }
.panel-heading p { margin: 5px 0 0; color: #9899a8; font-size: 8px; }
.text-button { color: var(--coral); border: 0; background: transparent; font-size: 9px; font-weight: 600; }
.text-button span { margin-left: 4px; font-size: 13px; }

.clinic-row {
    display: grid;
    grid-template-columns: 38px minmax(150px, 1.7fr) minmax(105px, 1fr) 62px 24px;
    gap: 11px;
    align-items: center;
    min-height: 66px;
    padding: 10px 18px;
    border-bottom: 1px solid #f0f0f4;
}
.clinic-row:last-child { border-bottom: 0; }
.clinic-logo { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--coral); background: var(--coral-soft); font-size: 12px; font-weight: 700; }
.clinic-row:nth-child(2n) .clinic-logo { color: var(--violet); background: var(--violet-soft); }
.clinic-row:nth-child(3n) .clinic-logo { color: var(--mint); background: var(--mint-soft); }
.clinic-name, .clinic-users { min-width: 0; }
.clinic-name strong, .clinic-name span, .clinic-users span, .clinic-users small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.clinic-name strong { color: #414253; font-size: 9px; font-weight: 600; }
.clinic-name span, .clinic-users small { margin-top: 5px; color: #a0a1af; font-size: 8px; }
.clinic-users span { color: #666779; font-size: 9px; }
.status { display: inline-flex; width: fit-content; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 10px; font-size: 8px; font-weight: 600; }
.status::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ''; }
.status.active { color: #26a785; background: #eaf9f4; }
.row-menu { color: #a4a5b2; border: 0; background: transparent; letter-spacing: 1px; }
.empty-state { padding: 45px 20px; color: var(--muted); font-size: 11px; text-align: center; }

.quick-panel { padding-bottom: 8px; }
.quick-action {
    display: flex;
    width: calc(100% - 24px);
    min-height: 60px;
    align-items: center;
    gap: 11px;
    margin: 8px 12px 0;
    padding: 9px;
    color: inherit;
    border: 0;
    border-radius: 10px;
    background: transparent;
    text-align: left;
    transition: background .2s;
}
.quick-action:hover { background: #f8f8fb; }
.quick-icon { width: 36px; height: 36px; border-radius: 9px; }
.quick-icon svg { width: 18px; }
.quick-action > span:nth-child(2) { min-width: 0; flex: 1; }
.quick-action strong, .quick-action small { display: block; }
.quick-action strong { color: #444556; font-size: 9px; font-weight: 600; }
.quick-action small { margin-top: 5px; color: #a0a1ae; font-size: 8px; }
.quick-action > b { color: #b1b2bd; font-size: 14px; font-weight: 400; }

.table-panel { min-height: 300px; }
.table-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.table-tools > span { color: var(--muted); font-size: 9px; }
.search { position: relative; width: min(100%, 360px); }
.search svg { position: absolute; top: 11px; left: 12px; width: 16px; fill: none; stroke: #999baa; stroke-width: 1.8; }
.search input { width: 100%; height: 38px; padding: 0 12px 0 36px; border: 1px solid var(--line); border-radius: 9px; outline: 0; font-size: 10px; }
.search input:focus { border-color: #c9c5ef; box-shadow: 0 0 0 3px var(--violet-soft); }
.responsive-table { overflow-x: auto; }
table { width: 100%; min-width: 720px; border-collapse: collapse; }
th { padding: 11px 18px; color: #999baa; background: #fafafd; font-size: 8px; font-weight: 600; letter-spacing: .4px; text-align: left; text-transform: uppercase; }
td { padding: 13px 18px; color: #646577; border-top: 1px solid #f0f0f4; font-size: 9px; }
td small { display: block; margin-top: 5px; color: #999baa; font-size: 8px; }
.table-identity { display: flex; align-items: center; gap: 11px; }
.table-identity span { min-width: 0; }
.table-identity strong, .table-identity small { display: block; max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.table-identity strong, td strong.plain { color: #404152; font-size: 9px; font-weight: 600; }
.avatar.small { width: 34px; height: 34px; }
.role-badge { padding: 4px 8px; border-radius: 8px; color: var(--violet); background: var(--violet-soft); font-size: 8px; font-weight: 600; }
.settings-placeholder { display: grid; min-height: 320px; place-items: center; align-content: center; padding: 40px; text-align: center; }
.settings-placeholder h2 { margin: 16px 0 4px; font-size: 15px; }
.settings-placeholder p { color: var(--muted); font-size: 10px; }

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    visibility: hidden;
    place-items: center;
    padding: 20px;
    opacity: 0;
    background: rgb(28 29 45 / 55%);
    backdrop-filter: blur(4px);
    transition: .2s ease;
}
.modal-backdrop.open { visibility: visible; opacity: 1; }
.modal {
    position: relative;
    width: min(100%, 570px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 27px;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 24px 80px rgb(20 21 35 / 28%);
    transform: translateY(8px) scale(.98);
    transition: .2s ease;
}
.modal-backdrop.open .modal { transform: none; }
.modal-close { position: absolute; top: 16px; right: 17px; display: grid; width: 30px; height: 30px; place-items: center; color: #8e8f9e; border: 0; border-radius: 8px; background: #f5f5f8; font-size: 20px; line-height: 1; }
.modal-icon { width: 42px; height: 42px; margin-bottom: 16px; }
.modal h2 { margin: 0; font-size: 18px; letter-spacing: -.3px; }
.modal > p { margin: 7px 0 22px; color: var(--muted); font-size: 10px; }
.modal-form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.modal-form label { color: #545568; font-size: 9px; font-weight: 600; }
.modal-form label.full, .modal-actions.full { grid-column: 1 / -1; }
.modal-form input, .modal-form select, .modal-form textarea {
    display: block;
    width: 100%;
    min-height: 40px;
    margin-top: 7px;
    padding: 10px 11px;
    color: var(--ink);
    border: 1px solid #e1e1e8;
    border-radius: 8px;
    outline: 0;
    background: #fff;
    font-size: 10px;
    font-weight: 400;
}
.modal-form textarea { min-height: 70px; resize: vertical; }
.modal-form input:focus, .modal-form select:focus, .modal-form textarea:focus { border-color: #b9b2ec; box-shadow: 0 0 0 3px var(--violet-soft); }
.modal-form label > small { display: block; margin-top: 5px; color: #d94343; font-size: 8px; font-weight: 500; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 7px; }
.toast { position: fixed; top: 82px; right: 28px; z-index: 90; display: flex; align-items: center; gap: 9px; padding: 12px 15px; border: 1px solid #c7eedf; border-radius: 10px; color: #247b64; background: #ecfaf6; box-shadow: 0 10px 30px rgb(35 70 60 / 12%); font-size: 10px; transition: .3s ease; }
.toast svg { width: 16px; fill: none; stroke: currentColor; stroke-width: 2; }
.toast.hide { opacity: 0; transform: translateY(-8px); }

/* Private login */
.login-body { margin: 0; min-height: 100vh; color: var(--ink); background: #fff; font-family: 'Instrument Sans', ui-sans-serif, system-ui, sans-serif; }
.login-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(460px, 1.05fr) minmax(420px, .95fr); }
.login-art { position: relative; overflow: hidden; padding: 38px 48px; color: #fff; background: #292a3e; }
.login-art::after { position: absolute; inset: auto -80px -180px auto; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgb(255 104 91 / 23%), transparent 67%); content: ''; }
.login-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.login-brand strong, .mobile-login-brand strong { font-size: 22px; letter-spacing: -.6px; }
.art-copy { position: relative; z-index: 2; width: min(100%, 520px); margin-top: clamp(110px, 19vh, 190px); }
.art-copy > span { color: #ff9188; font-size: 9px; font-weight: 700; letter-spacing: 1.8px; }
.art-copy h1 { margin: 18px 0 20px; font-size: clamp(38px, 4.1vw, 61px); font-weight: 600; line-height: 1.03; letter-spacing: -2.4px; }
.art-copy p { width: min(100%, 420px); margin: 0; color: #b5b6c4; font-size: 13px; line-height: 1.7; }
.art-orbit { position: absolute; border: 1px solid rgb(255 255 255 / 7%); border-radius: 50%; }
.orbit-one { width: 510px; height: 510px; right: -230px; top: 40px; }
.orbit-two { width: 720px; height: 720px; right: -300px; top: -60px; }
.floating-card { position: absolute; z-index: 3; display: flex; align-items: center; gap: 11px; padding: 12px 14px; border: 1px solid rgb(255 255 255 / 11%); border-radius: 13px; background: rgb(57 58 79 / 83%); box-shadow: 0 18px 42px rgb(0 0 0 / 18%); backdrop-filter: blur(10px); }
.floating-card span { min-width: 95px; }
.floating-card small, .floating-card strong { display: block; }
.floating-card small { margin-bottom: 4px; color: #a8a9ba; font-size: 8px; }
.floating-card strong { color: #fff; font-size: 11px; }
.floating-card i { padding: 4px 7px; border-radius: 8px; color: #71d3b9; background: rgb(46 183 153 / 14%); font-size: 8px; font-style: normal; }
.card-clinic { right: 8%; bottom: 19%; }
.card-team { left: 8%; bottom: 7%; }
.avatar-group { display: flex; }
.avatar-group b { display: grid; width: 29px; height: 29px; margin-left: -7px; place-items: center; border: 2px solid #3b3c52; border-radius: 50%; color: #fff; background: var(--violet); font-size: 7px; }
.avatar-group b:first-child { margin-left: 0; background: var(--coral); }
.avatar-group b:last-child { background: var(--mint); }
.login-panel { display: grid; place-items: center; padding: 40px; background: #fff; }
.login-form-wrap { width: min(100%, 370px); }
.mobile-login-brand { display: none; align-items: center; gap: 10px; margin-bottom: 55px; }
.login-form-wrap > h2 { margin: 0; font-size: 28px; font-weight: 600; letter-spacing: -1px; }
.login-subtitle { margin: 10px 0 31px; color: var(--muted); font-size: 11px; line-height: 1.6; }
.login-form { display: grid; gap: 18px; }
.login-form > label:not(.remember) { color: #555668; font-size: 10px; font-weight: 600; }
.input-with-icon { position: relative; display: block; margin-top: 8px; }
.input-with-icon > svg { position: absolute; top: 13px; left: 13px; width: 17px; fill: none; stroke: #9a9baa; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.input-with-icon input { width: 100%; height: 45px; padding: 0 42px; border: 1px solid #e1e1e8; border-radius: 9px; outline: 0; font-size: 11px; font-weight: 400; }
.input-with-icon input:focus { border-color: #afa7e9; box-shadow: 0 0 0 3px var(--violet-soft); }
.password-toggle { position: absolute; top: 9px; right: 8px; width: 30px; height: 28px; border: 0; background: transparent; filter: grayscale(1); opacity: .55; font-size: 12px; }
.remember { display: flex; align-items: center; gap: 8px; color: #6f7081; font-size: 9px; }
.remember input { width: 14px; height: 14px; accent-color: var(--coral); }
.login-submit { width: 100%; min-height: 46px; font-size: 11px; }
.login-submit span { margin-left: auto; font-size: 17px; }
.login-error { margin-top: -8px; padding: 9px 11px; border-radius: 8px; color: #bd3f36; background: var(--coral-soft); font-size: 9px; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 25px; color: #a0a1ae; font-size: 8px; }
.secure-note span { display: grid; width: 15px; height: 15px; place-items: center; border-radius: 50%; color: var(--mint); background: var(--mint-soft); font-size: 8px; }

@media (max-width: 980px) {
    .sidebar { width: 220px; transform: translateX(-100%); transition: transform .25s ease; }
    .sidebar.open { transform: none; }
    .admin-main { width: 100%; margin-left: 0; }
    .mobile-menu { display: block; }
    .topbar { padding: 0 22px; }
    .breadcrumb { margin-right: auto; margin-left: 16px; }
    .content { padding: 30px 24px 50px; }
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
    .metrics-grid .metric-card:last-child { grid-column: 1 / -1; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .login-shell { grid-template-columns: 1fr; }
    .login-art { display: none; }
    .login-panel { min-height: 100vh; }
    .mobile-login-brand { display: flex; }
}

@media (max-width: 640px) {
    .topbar { height: 58px; }
    .breadcrumb span, .breadcrumb b { display: none; }
    .content { padding: 24px 16px 40px; }
    .page-heading { align-items: flex-start; flex-direction: column; }
    .page-heading h1 { font-size: 24px; }
    .heading-actions { width: 100%; }
    .heading-actions .button { flex: 1; }
    .metrics-grid { grid-template-columns: 1fr; }
    .metrics-grid .metric-card:last-child { grid-column: auto; }
    .clinic-row { grid-template-columns: 38px 1fr 24px; }
    .clinic-users, .clinic-row .status { display: none; }
    .modal { padding: 22px 18px; }
    .modal-form { grid-template-columns: 1fr; }
    .modal-form label.full, .modal-actions.full { grid-column: auto; }
    .table-tools { align-items: flex-start; flex-direction: column; }
    .search { width: 100%; }
    .login-panel { padding: 28px 22px; }
    .mobile-login-brand { margin-bottom: 65px; }
}
