/* =========================================================
   DIETETIC.ART
   MOJE DIETY — PANEL PACJENTA
   ========================================================= */


/* =========================================================
   RESET / BASE
   ========================================================= */

.patient-dashboard,
.patient-dashboard *,
.patient-topbar,
.patient-topbar * {
    box-sizing: border-box;
}


/* =========================================================
   PATIENT TOPBAR
   ========================================================= */

.patient-topbar {
    width: 100%;
    min-height: 78px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
    padding: 0 28px;

    position: relative;
    z-index: 100;

    background:
        linear-gradient(
            180deg,
            rgba(8, 15, 28, .96),
            rgba(8, 15, 28, .88)
        );

    border-bottom:
        1px solid rgba(255,255,255,.07);

    box-shadow:
        0 10px 35px rgba(0,0,0,.18);

    backdrop-filter: blur(20px);
}


/* =========================================================
   TOPBAR LEFT
   ========================================================= */

.patient-topbar-left {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 18px;
}


/* =========================================================
   LOGO
   ========================================================= */

.patient-logo {
    display: flex;
    align-items: center;

    flex-shrink: 0;

    text-decoration: none;
}


.patient-logo img {
    display: block;

    width: auto;
    height: 38px;

    max-width: 170px;

    object-fit: contain;
}


/* =========================================================
   DIVIDER
   ========================================================= */

.patient-topbar-divider {
    width: 1px;
    height: 28px;

    flex-shrink: 0;

    background:
        rgba(255,255,255,.10);
}


/* =========================================================
   BACK BUTTON
   ========================================================= */

.patient-back-button {
    min-height: 40px;

    display: inline-flex;
    align-items: center;

    gap: 9px;
    padding: 0 13px;

    border-radius: 11px;

    border:
        1px solid rgba(255,255,255,.08);

    background:
        rgba(255,255,255,.035);

    color: #cbd5e1;

    font-size: 12px;
    font-weight: 750;

    text-decoration: none;

    transition:
        background .2s ease,
        border-color .2s ease,
        color .2s ease,
        transform .2s ease;
}


.patient-back-button:hover {
    color: white;

    background:
        rgba(14,165,233,.09);

    border-color:
        rgba(56,189,248,.25);

    transform:
        translateX(-2px);
}


.patient-back-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 24px;
    height: 24px;

    border-radius: 7px;

    background:
        rgba(14,165,233,.10);

    color: #38bdf8;

    font-size: 17px;

    line-height: 1;
}


/* =========================================================
   USER PANEL
   ========================================================= */

.patient-user-panel {
    position: relative;

    flex-shrink: 0;

    display: flex;
    align-items: center;
}


.patient-user-panel #user-avatar {
    width: 42px;
    height: 42px;

    display: block;

    object-fit: cover;

    border-radius: 13px;

    border:
        1px solid rgba(255,255,255,.12);

    background:
        rgba(255,255,255,.05);

    cursor: pointer;

    transition:
        border-color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;
}


.patient-user-panel #user-avatar:hover {
    transform: scale(1.04);

    border-color:
        rgba(56,189,248,.30);

    box-shadow:
        0 8px 20px rgba(0,0,0,.25);
}


/* =========================================================
   USER MENU
   ========================================================= */

.patient-user-panel .user-menu {
    position: absolute;

    top: calc(100% + 10px);
    right: 0;

    min-width: 180px;

    display: none;

    padding: 7px;

    border-radius: 14px;

    background:
        rgba(15,27,45,.98);

    border:
        1px solid rgba(255,255,255,.09);

    box-shadow:
        0 20px 45px rgba(0,0,0,.38);

    backdrop-filter: blur(20px);
}


.patient-user-panel .user-menu.open,
.patient-user-panel .user-menu.active {
    display: flex;

    flex-direction: column;

    gap: 3px;
}


.patient-user-panel .user-menu a,
.patient-user-panel .user-menu button {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 9px;

    padding: 10px 11px;

    border: 0;

    border-radius: 9px;

    background: transparent;

    color: #cbd5e1;

    font-family: inherit;

    font-size: 12px;
    font-weight: 700;

    text-align: left;

    text-decoration: none;

    cursor: pointer;

    transition:
        background .2s ease,
        color .2s ease;
}


.patient-user-panel .user-menu a:hover,
.patient-user-panel .user-menu button:hover {
    color: white;

    background:
        rgba(14,165,233,.10);
}


/* =========================================================
   MAIN
   ========================================================= */

.patient-dashboard {
    width: 100%;
    max-width: 1280px;

    margin: 40px auto 70px;

    padding:
        0 22px;

    position: relative;
    z-index: 2;
}


/* =========================================================
   HERO
   ========================================================= */

.patient-hero {
    position: relative;

    overflow: hidden;

    margin-bottom: 18px;

    padding: 32px;

    border-radius: 28px;

    background:
        linear-gradient(
            145deg,
            rgba(15,27,45,.96),
            rgba(11,18,32,.94)
        );

    border:
        1px solid rgba(255,255,255,.08);

    box-shadow:
        0 30px 80px rgba(0,0,0,.35),
        inset 0 1px 0 rgba(255,255,255,.035);

    backdrop-filter: blur(24px);
}


.patient-hero::before {
    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    right: -160px;
    top: -230px;

    background:
        radial-gradient(
            circle,
            rgba(14,165,233,.20),
            transparent 68%
        );

    filter: blur(40px);

    pointer-events: none;
}


.patient-hero::after {
    content: "";

    position: absolute;

    width: 260px;
    height: 260px;

    left: -160px;
    bottom: -180px;

    background:
        radial-gradient(
            circle,
            rgba(37,99,235,.12),
            transparent 70%
        );

    filter: blur(35px);

    pointer-events: none;
}


.patient-hero-content {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


.patient-hero-content h1 {
    margin: 8px 0 10px;

    color: #f8fafc;

    font-size:
        clamp(28px, 4vw, 40px);

    line-height: 1.1;

    font-weight: 850;

    letter-spacing: -1.3px;
}


.patient-hero-content p {
    max-width: 680px;

    margin: 0;

    color: #94a3b8;

    font-size: 14px;

    line-height: 1.65;
}


.patient-eyebrow,
.section-eyebrow {
    display: inline-block;

    color: #38bdf8;

    font-size: 10px;

    font-weight: 850;

    letter-spacing: .12em;

    text-transform: uppercase;
}


.patient-hero-icon {
    flex-shrink: 0;

    width: 78px;
    height: 78px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 23px;

    background:
        linear-gradient(
            135deg,
            rgba(14,165,233,.15),
            rgba(37,99,235,.13)
        );

    border:
        1px solid rgba(56,189,248,.20);

    box-shadow:
        0 15px 35px rgba(0,0,0,.22);

    font-size: 36px;
}


/* =========================================================
   STATS
   ========================================================= */

.patient-stats {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0,1fr));

    gap: 12px;

    margin-bottom: 18px;
}


.stat-card {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 16px;

    border-radius: 18px;

    background:
        rgba(15,23,42,.72);

    border:
        1px solid rgba(255,255,255,.07);

    box-shadow:
        0 15px 35px rgba(0,0,0,.20);

    transition:
        transform .2s ease,
        border-color .2s ease,
        background .2s ease;
}


.stat-card:hover {
    transform:
        translateY(-2px);

    background:
        rgba(255,255,255,.045);

    border-color:
        rgba(56,189,248,.20);
}


.stat-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background:
        rgba(14,165,233,.10);

    border:
        1px solid rgba(14,165,233,.12);

    font-size: 19px;
}


.stat-content {
    min-width: 0;
}


.stat-label {
    display: block;

    margin-bottom: 3px;

    color: #64748b;

    font-size: 10px;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: .07em;
}


.stat-content strong {
    color: #f8fafc;

    font-size: 20px;

    font-weight: 850;
}


/* =========================================================
   CONTENT
   ========================================================= */

.patient-content,
.recent-section {
    position: relative;

    padding: 28px;

    border-radius: 24px;

    background:
        linear-gradient(
            145deg,
            rgba(15,27,45,.92),
            rgba(11,18,32,.90)
        );

    border:
        1px solid rgba(255,255,255,.07);

    box-shadow:
        0 25px 65px rgba(0,0,0,.30);

    backdrop-filter: blur(20px);
}


.patient-content {
    margin-bottom: 18px;
}


.content-header {
    margin-bottom: 20px;
}


.content-header h2 {
    margin: 7px 0 0;

    color: #f8fafc;

    font-size: 23px;

    font-weight: 800;

    letter-spacing: -.5px;
}


/* =========================================================
   TABS
   ========================================================= */

.patient-tabs {
    display: flex;

    gap: 7px;

    flex-wrap: wrap;

    margin-bottom: 18px;

    padding: 6px;

    border-radius: 16px;

    background:
        rgba(255,255,255,.035);

    border:
        1px solid rgba(255,255,255,.06);
}


.patient-tab {
    min-height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    flex: 1;

    padding: 0 15px;

    border-radius: 11px;

    border:
        1px solid transparent;

    background:
        transparent;

    color: #94a3b8;

    font-size: 12px;

    font-weight: 750;

    cursor: pointer;

    transition: .2s ease;
}


.patient-tab:hover {
    color: #e0f2fe;

    background:
        rgba(14,165,233,.08);
}


.patient-tab.active {
    color: white;

    background:
        linear-gradient(
            135deg,
            #0284c7,
            #2563eb
        );

    border-color:
        rgba(56,189,248,.35);

    box-shadow:
        0 8px 20px rgba(14,165,233,.16);
}


/* =========================================================
   TOOLS
   ========================================================= */

.patient-tools {
    display: flex;
    align-items: center;

    gap: 10px;

    margin-bottom: 12px;
}


.patient-search {
    position: relative;

    flex: 1;

    min-width: 0;

    height: 44px;

    display: flex;
    align-items: center;

    border-radius: 13px;

    background:
        rgba(11,18,32,.72);

    border:
        1px solid rgba(255,255,255,.08);

    transition: .2s ease;
}


.patient-search:focus-within {
    border-color:
        rgba(14,165,233,.55);

    box-shadow:
        0 0 0 3px rgba(14,165,233,.08);
}


.search-icon {
    flex-shrink: 0;

    margin-left: 13px;

    color: #64748b;

    font-size: 15px;
}


.patient-search input {
    width: 100%;
    height: 100%;

    min-width: 0;

    padding:
        0 38px 0 10px;

    border: 0;
    outline: none;

    background: transparent;

    color: #f8fafc;

    font-family: inherit;

    font-size: 13px;
}


.patient-search input::placeholder {
    color: #64748b;
}


.clear-search {
    position: absolute;

    right: 8px;
    top: 50%;

    transform:
        translateY(-50%);

    width: 30px;
    height: 30px;

    display: none;
    align-items: center;
    justify-content: center;

    border: 0;

    border-radius: 9px;

    background:
        rgba(255,255,255,.06);

    color: #94a3b8;

    font-size: 19px;

    cursor: pointer;
}


.clear-search:hover {
    color: white;

    background:
        rgba(255,255,255,.10);
}


.patient-filter {
    display: flex;

    gap: 7px;

    flex-shrink: 0;
}


.filter-button,
.sort-select {
    height: 44px;

    border-radius: 13px;

    border:
        1px solid rgba(255,255,255,.08);

    background:
        rgba(255,255,255,.035);

    color: #cbd5e1;

    font-family: inherit;

    font-size: 12px;

    font-weight: 700;

    cursor: pointer;

    outline: none;
}


.filter-button {
    padding: 0 14px;
}


.sort-select {
    padding: 0 12px;
}


.filter-button:hover,
.sort-select:hover {
    border-color:
        rgba(14,165,233,.25);

    background:
        rgba(14,165,233,.08);

    color: white;
}


/* =========================================================
   FILTER PANEL
   ========================================================= */

.filter-panel {
    display: none;

    gap: 7px;

    flex-wrap: wrap;

    margin-bottom: 18px;

    padding: 10px;

    border-radius: 14px;

    background:
        rgba(255,255,255,.025);

    border:
        1px solid rgba(255,255,255,.06);
}


.filter-panel.open {
    display: flex;
}


.filter-chip {
    height: 34px;

    padding: 0 12px;

    border-radius: 10px;

    border:
        1px solid rgba(255,255,255,.07);

    background:
        rgba(255,255,255,.035);

    color: #94a3b8;

    font-family: inherit;

    font-size: 11px;

    font-weight: 750;

    cursor: pointer;

    transition: .2s ease;
}


.filter-chip:hover {
    color: white;

    border-color:
        rgba(14,165,233,.25);

    background:
        rgba(14,165,233,.08);
}


.filter-chip.active {
    color: white;

    background:
        linear-gradient(
            135deg,
            #0284c7,
            #2563eb
        );

    border-color:
        rgba(56,189,248,.35);
}


/* =========================================================
   TAB CONTENT
   ========================================================= */

.patient-tab-content {
    display: none;
}


.patient-tab-content.active {
    display: block;
}


.content-section {
    margin-top: 28px;
}


.content-section:first-child {
    margin-top: 0;
}


.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 15px;
}


.section-heading h3 {
    margin: 6px 0 0;

    color: #f8fafc;

    font-size: 20px;

    font-weight: 800;

    letter-spacing: -.4px;
}


.section-heading p {
    margin: 6px 0 0;

    color: #64748b;

    font-size: 12px;

    line-height: 1.5;
}


.section-link {
    flex-shrink: 0;

    padding: 7px 0;

    border: 0;

    background: transparent;

    color: #38bdf8;

    font-family: inherit;

    font-size: 12px;

    font-weight: 750;

    cursor: pointer;

    transition: .2s ease;
}


.section-link:hover {
    color: #7dd3fc;

    transform:
        translateX(2px);
}


/* =========================================================
   GRID
   ========================================================= */

.patient-grid {
    width: 100%;

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0,1fr));

    gap: 16px;

    align-items: stretch;
}


/* =========================================================
   PATIENT CARD
   ========================================================= */

.patient-card {
    position: relative;

    min-width: 0;
    min-height: 320px;

    overflow: hidden;

    isolation: isolate;

    border-radius: 21px;

    background:
        #0f172a;

    border:
        1px solid rgba(255,255,255,.08);

    box-shadow:
        0 18px 45px rgba(0,0,0,.28);

    transition:
        transform .25s ease,
        border-color .25s ease,
        box-shadow .25s ease;
}


.patient-card:hover {
    transform:
        translateY(-5px);

    border-color:
        rgba(56,189,248,.30);

    box-shadow:
        0 28px 60px rgba(0,0,0,.42);
}


/* =========================================================
   CARD IMAGE
   ========================================================= */

.card-image {
    position: absolute;

    inset: 0;

    z-index: -2;

    background-size: cover;
    background-position: center;

    opacity: .62;

    transform:
        scale(1.01);

    transition:
        transform .5s ease,
        opacity .3s ease;
}


.patient-card:hover .card-image {
    transform:
        scale(1.07);

    opacity: .70;
}


.card-image-overlay {
    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            180deg,
            rgba(11,18,32,.08) 0%,
            rgba(11,18,32,.20) 25%,
            rgba(11,18,32,.58) 55%,
            rgba(11,18,32,.97) 100%
        );
}


/* =========================================================
   CARD BODY
   ========================================================= */

.card-body {
    position: relative;

    z-index: 3;

    min-height: 320px;

    padding: 17px;

    display: flex;
    flex-direction: column;
}


.card-top-row {
    min-height: 40px;

    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 10px;
}


/* =========================================================
   LABEL
   ========================================================= */

.card-label {
    display: inline-flex;
    align-items: center;

    gap: 6px;

    max-width:
        calc(100% - 48px);

    padding: 7px 10px;

    border-radius: 999px;

    color: white;

    background:
        rgba(15,23,42,.76);

    border:
        1px solid rgba(255,255,255,.15);

    backdrop-filter: blur(14px);

    box-shadow:
        0 8px 20px rgba(0,0,0,.22);

    font-size: 10px;

    font-weight: 850;

    letter-spacing: .04em;

    text-transform: uppercase;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


.card-label.green {
    background:
        linear-gradient(
            135deg,
            rgba(16,185,129,.90),
            rgba(5,150,105,.80)
        );
}


.card-label.red {
    background:
        linear-gradient(
            135deg,
            rgba(244,63,94,.90),
            rgba(190,24,93,.82)
        );
}


.card-label.orange {
    background:
        linear-gradient(
            135deg,
            rgba(245,158,11,.92),
            rgba(234,88,12,.82)
        );
}


.card-label.blue {
    background:
        linear-gradient(
            135deg,
            rgba(14,165,233,.92),
            rgba(37,99,235,.82)
        );
}


.card-label.purple {
    background:
        linear-gradient(
            135deg,
            rgba(168,85,247,.92),
            rgba(126,34,206,.82)
        );
}


.card-label.emerald {
    background:
        linear-gradient(
            135deg,
            #10b981,
            #047857
        );
}


.card-label.rose {
    background:
        linear-gradient(
            135deg,
            #f43f5e,
            #be123c
        );
}


.card-label.gold {
    color: #111827;

    background:
        linear-gradient(
            135deg,
            #facc15,
            #ca8a04
        );
}


.card-label.cyan {
    background:
        linear-gradient(
            135deg,
            #06b6d4,
            #0284c7
        );
}


/* =========================================================
   FAVORITE
   ========================================================= */

.favorite-button {
    flex-shrink: 0;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 12px;

    border:
        1px solid rgba(255,255,255,.12);

    background:
        rgba(11,18,32,.72);

    backdrop-filter: blur(14px);

    color: #cbd5e1;

    font-size: 19px;

    cursor: pointer;

    transition: .2s ease;
}


.favorite-button:hover {
    transform:
        scale(1.06);

    color: #fbbf24;

    border-color:
        rgba(251,191,36,.35);

    background:
        rgba(251,191,36,.10);
}


.favorite-button.active {
    color: #fbbf24;

    background:
        rgba(251,191,36,.13);

    border-color:
        rgba(251,191,36,.35);

    box-shadow:
        0 0 18px rgba(251,191,36,.13);
}


/* =========================================================
   CARD MAIN
   ========================================================= */

.card-main {
    margin-top: auto;

    min-width: 0;
}


.card-type {
    display: block;

    margin-bottom: 6px;

    color: #38bdf8;

    font-size: 9px;

    font-weight: 850;

    letter-spacing: .11em;

    text-transform: uppercase;
}


.card-main h3 {
    margin: 0;

    color: #ffffff;

    font-size: 18px;

    line-height: 1.25;

    font-weight: 800;

    letter-spacing: -.3px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =========================================================
   CARD META
   ========================================================= */

.card-meta {
    display: grid;

    grid-template-columns:
        repeat(4,minmax(0,1fr));

    gap: 6px;

    margin-top: 12px;
}


.card-meta span {
    min-width: 0;

    padding: 8px 5px;

    border-radius: 10px;

    background:
        rgba(255,255,255,.07);

    border:
        1px solid rgba(255,255,255,.08);

    color: #e2e8f0;

    font-size: 9px;

    font-weight: 750;

    text-align: center;

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis;
}


/* =========================================================
   CARD ACTION
   ========================================================= */

.card-action {
    width: 100%;

    min-height: 40px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-top: 10px;

    padding: 0 13px;

    border: 0;

    border-radius: 12px;

    background:
        linear-gradient(
            135deg,
            #0284c7,
            #2563eb
        );

    color: white;

    font-family: inherit;

    font-size: 12px;

    font-weight: 750;

    cursor: pointer;

    box-shadow:
        0 8px 18px rgba(37,99,235,.16);

    transition:
        transform .2s ease,
        filter .2s ease;
}


.card-action span {
    font-size: 16px;

    transition:
        transform .2s ease;
}


.card-action:hover {
    transform:
        translateY(-2px);

    filter:
        brightness(1.08);
}


.card-action:hover span {
    transform:
        translateX(3px);
}


/* =========================================================
   LOADING
   ========================================================= */

.loading-card {
    grid-column: 1 / -1;

    min-height: 180px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-direction: column;

    gap: 12px;

    border-radius: 18px;

    background:
        rgba(255,255,255,.025);

    border:
        1px dashed rgba(255,255,255,.08);

    color: #64748b;

    font-size: 12px;
}


.loading-spinner {
    width: 36px;
    height: 36px;

    border-radius: 50%;

    border:
        3px solid rgba(255,255,255,.08);

    border-top-color:
        #38bdf8;

    animation:
        patient-spin .8s linear infinite;
}


@keyframes patient-spin {
    from {
        transform: rotate(0);
    }

    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   EMPTY STATE
   ========================================================= */

.empty-state {
    grid-column: 1 / -1;

    min-height: 180px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-direction: column;

    padding: 30px;

    border-radius: 19px;

    background:
        rgba(255,255,255,.025);

    border:
        1px dashed rgba(255,255,255,.10);

    text-align: center;
}


.empty-state.compact {
    min-height: 130px;
}


.empty-state-icon {
    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin-bottom: 12px;

    border-radius: 15px;

    background:
        rgba(14,165,233,.10);

    border:
        1px solid rgba(14,165,233,.10);

    color: #38bdf8;

    font-size: 22px;
}


.empty-state h3 {
    margin: 0 0 6px;

    color: #e2e8f0;

    font-size: 17px;

    font-weight: 800;
}


.empty-state p {
    max-width: 430px;

    margin: 0;

    color: #64748b;

    font-size: 12px;

    line-height: 1.5;
}


/* =========================================================
   RECENT
   ========================================================= */

.recent-section {
    margin-top: 18px;
}


.recent-grid {
    display: grid;

    grid-template-columns:
        repeat(4,minmax(0,1fr));

    gap: 10px;
}


.recent-card {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 10px;

    padding: 10px;

    border-radius: 14px;

    border:
        1px solid rgba(255,255,255,.07);

    background:
        rgba(255,255,255,.035);

    color: #cbd5e1;

    text-align: left;

    cursor: pointer;

    transition: .2s ease;
}


.recent-card:hover {
    transform:
        translateY(-2px);

    border-color:
        rgba(56,189,248,.22);

    background:
        rgba(14,165,233,.06);
}


.recent-image {
    flex-shrink: 0;

    width: 48px;
    height: 48px;

    border-radius: 11px;

    background-size: cover;
    background-position: center;

    border:
        1px solid rgba(255,255,255,.08);
}


.recent-info {
    min-width: 0;

    flex: 1;
}


.recent-info small {
    display: block;

    margin-bottom: 3px;

    color: #64748b;

    font-size: 9px;

    font-weight: 800;

    text-transform: uppercase;

    letter-spacing: .06em;
}


.recent-info strong {
    display: block;

    color: #e2e8f0;

    font-size: 11px;

    overflow: hidden;

    text-overflow: ellipsis;

    white-space: nowrap;
}


/* =========================================================
   TOAST
   ========================================================= */

.toast {
    position: fixed;

    right: 22px;
    bottom: 22px;

    z-index: 99999;

    max-width: 320px;

    padding: 13px 16px;

    border-radius: 14px;

    background:
        rgba(15,27,45,.96);

    border:
        1px solid rgba(255,255,255,.10);

    backdrop-filter: blur(18px);

    box-shadow:
        0 20px 45px rgba(0,0,0,.4);

    color: #f8fafc;

    font-size: 13px;

    font-weight: 650;

    opacity: 0;

    transform:
        translateY(15px);

    pointer-events: none;

    transition: .25s ease;
}


.toast.show {
    opacity: 1;

    transform:
        translateY(0);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

    .patient-dashboard {
        padding:
            0 16px;
    }


    .patient-grid {
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }


    .patient-stats {
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }


    .recent-grid {
        grid-template-columns:
            repeat(2,minmax(0,1fr));
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .patient-topbar {
        min-height: 68px;

        padding:
            0 14px;

        gap: 12px;
    }


    .patient-topbar-left {
        gap: 11px;
    }


    .patient-logo img {
        height: 32px;

        max-width: 135px;
    }


    .patient-topbar-divider {
        height: 24px;
    }


    .patient-back-button {
        min-height: 37px;

        padding:
            0 10px;

        gap: 6px;

        font-size: 11px;
    }


    .patient-back-icon {
        width: 22px;
        height: 22px;

        font-size: 15px;
    }


    .patient-user-panel #user-avatar {
        width: 38px;
        height: 38px;

        border-radius: 11px;
    }


    .patient-dashboard {
        margin-top: 25px;

        padding:
            0 12px;
    }


    .patient-hero,
    .patient-content,
    .recent-section {
        padding: 20px;

        border-radius: 22px;
    }


    .patient-hero-content {
        align-items: flex-start;
    }


    .patient-hero-icon {
        width: 60px;
        height: 60px;

        border-radius: 18px;

        font-size: 27px;
    }


    .patient-tools {
        flex-direction: column;

        align-items: stretch;
    }


    .patient-filter {
        display: grid;

        grid-template-columns:
            1fr 1fr;
    }


    .filter-button,
    .sort-select {
        width: 100%;
    }


    .patient-grid {
        grid-template-columns: 1fr;

        gap: 13px;
    }


    .recent-grid {
        grid-template-columns: 1fr;
    }


    .section-heading {
        align-items: flex-start;

        flex-direction: column;

        gap: 5px;
    }


    .section-link {
        padding-top: 0;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .patient-topbar {
        padding:
            0 10px;
    }


    .patient-topbar-left {
        gap: 8px;
    }


    .patient-logo img {
        height: 29px;

        max-width: 112px;
    }


    .patient-topbar-divider {
        display: none;
    }


    .patient-back-button {
        padding:
            0 8px;
    }


    .patient-back-button span:last-child {
        max-width: 88px;

        overflow: hidden;

        white-space: nowrap;

        text-overflow: ellipsis;
    }


    .patient-user-panel #user-avatar {
        width: 36px;
        height: 36px;
    }


    .patient-dashboard {
        margin-top: 18px;
    }


    .patient-hero,
    .patient-content,
    .recent-section {
        padding: 16px;

        border-radius: 19px;
    }


    .patient-hero-content {
        display: block;
    }


    .patient-hero-icon {
        display: none;
    }


    .patient-hero-content h1 {
        font-size: 27px;
    }


    .patient-hero-content p {
        font-size: 13px;
    }


    .patient-stats {
        gap: 8px;
    }


    .stat-card {
        padding: 12px;

        gap: 9px;
    }


    .stat-icon {
        width: 36px;
        height: 36px;

        border-radius: 11px;

        font-size: 16px;
    }


    .stat-label {
        font-size: 9px;
    }


    .stat-content strong {
        font-size: 16px;
    }


    .patient-tabs {
        display: grid;

        grid-template-columns:
            repeat(2,1fr);
    }


    .patient-tab {
        width: 100%;

        padding:
            0 8px;
    }


    .patient-filter {
        grid-template-columns: 1fr;
    }


    .filter-panel.open {
        display: grid;

        grid-template-columns:
            repeat(2,1fr);
    }


    .filter-chip {
        width: 100%;
    }


    .patient-card {
        min-height: 285px;

        border-radius: 18px;
    }


    .card-body {
        min-height: 285px;

        padding: 15px;
    }


    .card-meta {
        grid-template-columns:
            repeat(2,1fr);
    }


    .card-meta span {
        font-size: 9px;
    }


    .card-action {
        min-height: 42px;
    }


    .card-label {
        max-width:
            calc(100% - 45px);
    }


    .favorite-button {
        width: 36px;
        height: 36px;
    }


    .recent-card {
        padding: 9px;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        animation-duration:
            .01ms !important;

        animation-iteration-count:
            1 !important;

        transition-duration:
            .01ms !important;
    }
}