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

:root {
    --ink: #2f2433;
    --muted: #7c6f82;
    --rose: #d94683;
    --rose-dark: #be2f6d;
    --blush: #fff4f8;
    --lavender: #f2edff;
    --mint: #e9fbf3;
    --gold: #fff4cc;
    --line: #eadde7;
    --panel: rgba(255, 255, 255, 0.88);
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 10%, rgba(217, 70, 131, 0.16), transparent 28%),
        radial-gradient(circle at 88% 18%, rgba(125, 211, 252, 0.22), transparent 26%),
        radial-gradient(circle at 70% 88%, rgba(250, 204, 21, 0.16), transparent 28%),
        linear-gradient(135deg, #fff8fb 0%, #f7f0ff 48%, #eefbf6 100%);
    color: var(--ink);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    line-height: 1.5;
}

button,
input,
select {
    font: inherit;
}

.app-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    position: sticky;
    top: 0;
    overflow: hidden;
    min-height: 100vh;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    background:
        linear-gradient(115deg, transparent 12%, rgba(255, 255, 255, 0.05) 25%, rgba(249, 168, 212, 0.2) 37%, rgba(196, 181, 253, 0.22) 50%, rgba(94, 234, 212, 0.12) 62%, transparent 78%),
        radial-gradient(circle at 18% 12%, rgba(250, 204, 21, 0.16), transparent 22%),
        radial-gradient(circle at 88% 18%, rgba(244, 114, 182, 0.2), transparent 24%),
        linear-gradient(165deg, #3b1736 0%, #5b214a 46%, #7c2d58 100%);
    padding: 28px 18px;
    box-shadow: 12px 0 35px rgba(91, 33, 74, 0.18);
}

.sidebar::before,
.sidebar::after {
    position: absolute;
    pointer-events: none;
    content: "";
}

.sidebar::before {
    inset: 0;
    background:
        linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, 0.08) 30%, rgba(249, 168, 212, 0.26) 44%, rgba(196, 181, 253, 0.2) 56%, transparent 72%),
        radial-gradient(circle at 34% 18%, rgba(255, 255, 255, 0.5), transparent 2px),
        radial-gradient(circle at 42% 24%, rgba(253, 230, 138, 0.55), transparent 2px),
        radial-gradient(circle at 52% 30%, rgba(249, 168, 212, 0.5), transparent 2px),
        radial-gradient(circle at 62% 38%, rgba(196, 181, 253, 0.5), transparent 2px),
        radial-gradient(circle at 70% 44%, rgba(255, 255, 255, 0.42), transparent 2px),
        radial-gradient(circle at 24% 56%, rgba(255, 255, 255, 0.3), transparent 2px),
        radial-gradient(circle at 46% 64%, rgba(249, 168, 212, 0.32), transparent 2px),
        radial-gradient(circle at 68% 72%, rgba(94, 234, 212, 0.28), transparent 2px);
    filter: blur(1px);
    opacity: 0.82;
    transform: rotate(-4deg);
    animation: milky-way-glow 4s ease-in-out infinite;
}

.sidebar::after {
    top: 74px;
    left: 22px;
    width: 10px;
    height: 10px;
    background: #fff7fb;
    box-shadow:
        38px -20px 0 -4px #fde68a,
        86px 12px 0 1px #f9a8d4,
        138px -14px 0 -2px #5eead4,
        176px 38px 0 -4px #ffffff,
        26px 92px 0 0 #c4b5fd,
        122px 120px 0 -3px #facc15,
        66px 174px 0 -1px #f9a8d4,
        156px 226px 0 -4px #ffffff,
        32px 284px 0 -3px #fde68a,
        128px 342px 0 0 #c4b5fd,
        182px 420px 0 -2px #5eead4;
    clip-path: polygon(50% 0, 62% 35%, 100% 50%, 62% 65%, 50% 100%, 38% 65%, 0 50%, 38% 35%);
    filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.72));
    animation: sidebar-star-dance 2.1s ease-in-out infinite;
}

.sidebar h1 {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    color: #dbeafe;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    font-weight: 900;
    letter-spacing: 1.8px;
    text-transform: uppercase;
    text-shadow:
        0 0 8px rgba(255, 255, 255, 0.7),
        0 0 18px rgba(96, 165, 250, 0.9),
        0 0 34px rgba(37, 99, 235, 0.72),
        0 4px 18px rgba(15, 23, 42, 0.44);
    animation: brand-shine 2.8s ease-in-out infinite;
}

.sidebar h1::before {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a, #2563eb 52%, #93c5fd);
    color: #ffffff;
    content: "S";
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 19px;
    font-weight: 900;
    box-shadow:
        0 0 16px rgba(147, 197, 253, 0.82),
        0 0 30px rgba(37, 99, 235, 0.48);
}

.sidebar h1::after {
    position: absolute;
    top: -14px;
    right: -8px;
    width: 12px;
    height: 12px;
    background: #facc15;
    box-shadow:
        -36px 8px 0 0 #f9a8d4,
        -18px 38px 0 0 #a78bfa,
        18px 28px 0 0 #5eead4,
        36px 2px 0 0 #f472b6,
        -62px 30px 0 0 #fde68a,
        -82px 4px 0 -2px #ffffff,
        52px 40px 0 -2px #ffffff,
        -8px -12px 0 -2px #fef3c7;
    content: "";
    clip-path: polygon(50% 0, 62% 35%, 100% 50%, 62% 65%, 50% 100%, 38% 65%, 0 50%, 38% 35%);
    animation: glitter-twinkle 1.8s ease-in-out infinite;
}

.sidebar nav a {
    color: rgba(255, 247, 251, 0.8);
}

.sidebar a:hover,
.sidebar a:focus {
    border-color: rgba(249, 168, 212, 0.7);
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    outline: none;
}

@keyframes brand-shine {
    0%,
    100% {
        filter: brightness(1);
    }

    45% {
        filter: brightness(1.35);
    }

    65% {
        filter: brightness(1.08);
    }
}

@keyframes glitter-twinkle {
    0%,
    100% {
        opacity: 0.42;
        transform: scale(0.75) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: scale(1.28) rotate(28deg);
    }
}

@keyframes sidebar-sparkle-fade {
    0%,
    100% {
        opacity: 0.45;
    }

    45% {
        opacity: 0.95;
    }

    70% {
        opacity: 0.6;
    }
}

@keyframes milky-way-glow {
    0%,
    100% {
        opacity: 0.62;
        transform: translateY(0) rotate(-4deg);
    }

    50% {
        opacity: 1;
        transform: translateY(8px) rotate(-4deg);
    }
}

@keyframes sidebar-star-dance {
    0%,
    100% {
        opacity: 0.45;
        transform: scale(0.8) rotate(0deg);
    }

    50% {
        opacity: 1;
        transform: scale(1.18) rotate(28deg);
    }
}

.sidebar nav {
    display: grid;
    gap: 10px;
}

.sidebar a {
    border: 1px solid transparent;
    border-radius: 8px;
    color: rgba(255, 247, 251, 0.82);
    font-weight: 800;
    padding: 11px 12px;
    text-decoration: none;
}

.sidebar a:hover,
.sidebar a:focus {
    border-color: rgba(249, 168, 212, 0.7);
    background: rgba(255, 255, 255, 0.13);
    color: #ffffff;
    outline: none;
}

.main-content {
    min-width: 0;
    padding: 28px;
}

.topbar,
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.topbar {
    position: relative;
    align-items: flex-start;
    overflow: hidden;
    border: 1px solid rgba(234, 221, 231, 0.85);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 247, 251, 0.74) 48%, rgba(255, 244, 248, 0.45) 100%),
        url("../assets/images/ROUNDUP-KOREAN-SKINCARE-2048px-9736-2x1-1.webp") center center / cover no-repeat,
        rgba(255, 255, 255, 0.72);
    padding: 18px 20px;
    box-shadow: 0 18px 45px rgba(120, 72, 104, 0.08);
}

.topbar::before,
.topbar::after {
    position: absolute;
    pointer-events: none;
    content: "";
}

.topbar::before {
    right: 92px;
    bottom: -22px;
    width: 118px;
    height: 118px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(244, 114, 182, 0.2) 0 10px, transparent 11px),
        radial-gradient(ellipse at 50% 18%, rgba(244, 114, 182, 0.28) 0 20px, transparent 21px),
        radial-gradient(ellipse at 82% 50%, rgba(244, 114, 182, 0.26) 0 20px, transparent 21px),
        radial-gradient(ellipse at 50% 82%, rgba(244, 114, 182, 0.24) 0 20px, transparent 21px),
        radial-gradient(ellipse at 18% 50%, rgba(244, 114, 182, 0.26) 0 20px, transparent 21px);
    opacity: 0.9;
    transform: rotate(-18deg);
}

.topbar::after {
    right: 22px;
    top: 16px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 50%, rgba(190, 24, 93, 0.16) 0 8px, transparent 9px),
        radial-gradient(ellipse at 50% 16%, rgba(251, 207, 232, 0.55) 0 17px, transparent 18px),
        radial-gradient(ellipse at 84% 50%, rgba(251, 207, 232, 0.5) 0 17px, transparent 18px),
        radial-gradient(ellipse at 50% 84%, rgba(251, 207, 232, 0.5) 0 17px, transparent 18px),
        radial-gradient(ellipse at 16% 50%, rgba(251, 207, 232, 0.5) 0 17px, transparent 18px);
    opacity: 0.8;
    transform: rotate(22deg);
}

.topbar h2 {
    position: relative;
    z-index: 1;
    max-width: 690px;
    color: #1e3a8a;
    font-family: "Malgun Gothic", "Yu Gothic", "Trebuchet MS", Arial, sans-serif;
    font-size: 40px;
    font-weight: 900;
    letter-spacing: 3px;
    line-height: 1.05;
    text-transform: uppercase;
    text-shadow:
        0 2px 0 rgba(255, 255, 255, 0.85),
        0 0 14px rgba(147, 197, 253, 0.42),
        0 10px 24px rgba(59, 130, 246, 0.18);
}

.topbar h2::before {
    display: block;
    margin-bottom: 5px;
    color: #be185d;
    content: "K-Beauty";
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 4px;
    text-transform: uppercase;
}

.topbar p {
    position: relative;
    z-index: 1;
    max-width: 560px;
    color: var(--muted);
    font-weight: 650;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.stat-card,
.panel {
    border: 1px solid rgba(234, 221, 231, 0.9);
    border-radius: 8px;
    background: var(--panel);
    box-shadow: 0 18px 45px rgba(120, 72, 104, 0.09);
}

.stat-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
}

.stat-card::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    content: "";
}

.stat-card:nth-child(1)::before {
    background: #d94683;
}

.stat-card:nth-child(2)::before {
    background: #14b8a6;
}

.stat-card:nth-child(3)::before {
    background: #8b5cf6;
}

.stat-card:nth-child(4)::before {
    background: #f59e0b;
}

.stat-card h3 {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

.stat-card p {
    margin-top: 8px;
    color: var(--ink);
    font-size: 31px;
    font-weight: 900;
}

.panel {
    margin-bottom: 22px;
    overflow: hidden;
}

.section-header {
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, #fff7fb, #f2edff);
    margin-bottom: 0;
    padding: 18px 20px;
}

.section-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.section-header h2 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 24px;
}

.section-note {
    color: var(--muted);
    font-weight: 800;
}

.brand-stock-list {
    display: grid;
    gap: 14px;
    padding: 18px 20px;
}

.brand-stock-group {
    overflow: hidden;
    border: 1px solid #ecd4e4;
    border-radius: 8px;
    background: linear-gradient(135deg, #ffffff, #fff7fb);
}

.brand-stock-group.other-brand {
    border-color: #d8dbe8;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
}

.brand-stock-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #f0ddeb;
    background: linear-gradient(90deg, #ffe4f0, #f2edff);
    padding: 12px 14px;
}

.other-brand .brand-stock-heading {
    background: linear-gradient(90deg, #f1f5f9, #eef2ff);
}

.brand-stock-heading h3 {
    font-size: 18px;
    font-weight: 900;
}

.brand-stock-heading span {
    border-radius: 999px;
    background: #ffffff;
    color: #be2f6d;
    font-size: 13px;
    font-weight: 900;
    padding: 5px 10px;
}

.brand-stock-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    padding: 12px;
}

.brand-stock-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    border: 1px solid #f2e1eb;
    border-radius: 8px;
    background: #ffffff;
    padding: 10px 12px;
}

.brand-stock-item span {
    font-weight: 800;
}

.brand-stock-item strong {
    display: grid;
    min-width: 34px;
    min-height: 30px;
    place-items: center;
    border-radius: 999px;
    background: #dcfce7;
    color: #166534;
    font-weight: 900;
}

.brand-stock-item.low strong {
    background: #fef3c7;
    color: #92400e;
}

.brand-stock-item.out strong {
    background: #fee2e2;
    color: #991b1b;
}

.inventory-notes-list {
    display: grid;
    gap: 12px;
    padding: 18px 20px;
}

.inventory-note-card {
    border: 1px solid #eadde7;
    border-radius: 8px;
    background: #ffffff;
    padding: 14px;
}

.inventory-note-card div {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
}

.inventory-note-card strong {
    color: #be2f6d;
    font-weight: 900;
}

.inventory-note-card span {
    color: var(--muted);
    font-weight: 800;
}

.inventory-note-card ul {
    display: grid;
    gap: 5px;
    padding-left: 18px;
}

.password-manager {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    padding: 18px 20px;
}

.account-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    border: 1px solid #eadde7;
    border-radius: 8px;
    background: #ffffff;
    padding: 16px;
}

.account-form h3 {
    color: #1e3a8a;
    font-size: 18px;
    font-weight: 900;
}

.account-form label {
    display: grid;
    gap: 6px;
    color: #7c4564;
    font-weight: 900;
}

.password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
}

.password-field button {
    min-width: 72px;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.danger-button {
    background: #fee2e2;
    color: #991b1b;
    box-shadow: none;
}

.danger-button:hover,
.danger-button:focus {
    background: #ef4444;
    color: #ffffff;
}

form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
    padding: 18px 20px;
}

.account-form {
    grid-template-columns: 1fr;
    padding: 16px;
}

.inventory-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(150px, 1fr));
    gap: 12px;
    border-top: 1px solid var(--line);
    padding: 16px 20px;
}

.inventory-list-message {
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-weight: 900;
    padding: 18px 20px;
}

.inventory-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
}

input,
select {
    width: 100%;
    border: 1px solid #e6d5df;
    border-radius: 8px;
    background: #ffffff;
    color: var(--ink);
    padding: 11px 12px;
}

input:focus,
select:focus {
    border-color: #d94683;
    outline: 3px solid rgba(217, 70, 131, 0.18);
}

button {
    border: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--rose), #8b5cf6);
    color: #ffffff;
    cursor: pointer;
    font-weight: 800;
    padding: 10px 14px;
    box-shadow: 0 10px 20px rgba(217, 70, 131, 0.22);
}

button:hover,
button:focus {
    background: linear-gradient(135deg, var(--rose-dark), #7c3aed);
    outline: none;
}

.secondary-button {
    background: #ffffff;
    color: #1e3a8a;
    box-shadow: none;
}

.secondary-button:hover,
.secondary-button:focus {
    background: #dbeafe;
    color: #1e3a8a;
}

.is-hidden {
    display: none;
}

.topbar button {
    position: relative;
    z-index: 1;
    margin-top: 2px;
}

.topbar-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
    margin-left: auto;
}

.admin-menu {
    position: relative;
}

#adminMenuButton {
    display: grid;
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    place-items: center;
    background: transparent;
    color: #1e3a8a;
    font-size: 28px;
    line-height: 1;
    padding: 4px;
    box-shadow: none;
}

#adminMenuButton:hover,
#adminMenuButton:focus {
    background: rgba(255, 255, 255, 0.62);
    color: #be2f6d;
}

.admin-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 5;
    min-width: 170px;
    border: 1px solid #eadde7;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(47, 36, 51, 0.18);
    padding: 8px;
}

.admin-menu-panel button {
    width: 100%;
    background: #fff7fb;
    color: #be2f6d;
    box-shadow: none;
    text-align: left;
}

.admin-menu-panel button:hover,
.admin-menu-panel button:focus {
    background: #fee2e2;
    color: #991b1b;
}

.topbar button:hover,
.topbar button:focus {
    color: #ffffff;
}

.topbar .admin-menu-panel button:hover,
.topbar .admin-menu-panel button:focus {
    background: #fee2e2;
    color: #991b1b;
}

.login-page {
    position: relative;
    display: grid;
    min-height: 100vh;
    background:
        linear-gradient(115deg, rgba(30, 58, 138, 0.1), rgba(124, 45, 88, 0.18)),
        radial-gradient(circle at 16% 16%, rgba(250, 204, 21, 0.22), transparent 22%),
        radial-gradient(circle at 86% 22%, rgba(96, 165, 250, 0.24), transparent 24%),
        linear-gradient(165deg, #3b1736 0%, #5b214a 46%, #7c2d58 100%);
    place-items: center;
    padding: 24px;
    overflow: hidden;
}

.login-page::before,
.login-page::after {
    position: fixed;
    pointer-events: none;
    content: "";
}

.login-page::before {
    inset: 0;
    background:
        linear-gradient(115deg, transparent 18%, rgba(255, 255, 255, 0.08) 30%, rgba(249, 168, 212, 0.25) 44%, rgba(196, 181, 253, 0.2) 56%, transparent 72%),
        radial-gradient(circle at 24% 18%, rgba(255, 255, 255, 0.5), transparent 2px),
        radial-gradient(circle at 38% 28%, rgba(253, 230, 138, 0.55), transparent 2px),
        radial-gradient(circle at 62% 30%, rgba(249, 168, 212, 0.5), transparent 2px),
        radial-gradient(circle at 72% 52%, rgba(196, 181, 253, 0.5), transparent 2px),
        radial-gradient(circle at 28% 72%, rgba(94, 234, 212, 0.32), transparent 2px);
    opacity: 0.85;
    animation: milky-way-glow 4s ease-in-out infinite;
}

.login-page::after {
    top: 18%;
    left: 18%;
    width: 11px;
    height: 11px;
    background: #fff7fb;
    box-shadow:
        80px -34px 0 -4px #fde68a,
        210px 12px 0 1px #f9a8d4,
        420px -18px 0 -2px #5eead4,
        620px 72px 0 -4px #ffffff,
        110px 190px 0 0 #c4b5fd,
        480px 260px 0 -3px #facc15,
        280px 360px 0 -1px #f9a8d4;
    clip-path: polygon(50% 0, 62% 35%, 100% 50%, 62% 65%, 50% 100%, 38% 65%, 0 50%, 38% 35%);
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.72));
    animation: sidebar-star-dance 2.1s ease-in-out infinite;
}

.login-admin-menu {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 3;
}

#loginAdminMenuButton {
    display: grid;
    width: 40px;
    min-width: 40px;
    min-height: 40px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.48);
    background: rgba(255, 255, 255, 0.9);
    color: #5b214a;
    font-size: 28px;
    line-height: 1;
    padding: 4px;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

#loginAdminMenuButton:hover,
#loginAdminMenuButton:focus {
    background: #fff7fb;
    color: #be2f6d;
}

.login-admin-menu-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 150px;
    border: 1px solid rgba(234, 221, 231, 0.92);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.25);
    padding: 8px;
}

.login-admin-menu-panel a {
    display: block;
    border-radius: 8px;
    color: #be2f6d;
    font-weight: 900;
    padding: 9px 10px;
    text-decoration: none;
}

.login-admin-menu-panel a:hover,
.login-admin-menu-panel a:focus {
    background: #fff7fb;
    outline: none;
}

.login-back-link {
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 3;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.48);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #5b214a;
    font-size: 25px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.login-back-link:hover,
.login-back-link:focus {
    background: #fff7fb;
    color: #be2f6d;
    outline: none;
}

.login-card {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.28);
    padding: 28px;
}

.login-hint {
    color: #7c4564;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
}

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

.login-brand h1 {
    position: relative;
    display: inline-block;
    background: linear-gradient(90deg, #0f172a 0%, #1d4ed8 28%, #93c5fd 48%, #1e3a8a 68%, #0f172a 100%);
    background-size: 220% 100%;
    color: #1e3a8a;
    font-family: "Malgun Gothic", "Yu Gothic", "Trebuchet MS", Arial, sans-serif;
    font-size: 34px;
    font-weight: 900;
    letter-spacing: 3px;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow:
        0 0 10px rgba(255, 255, 255, 0.95),
        0 0 22px rgba(96, 165, 250, 0.95),
        0 0 42px rgba(37, 99, 235, 0.75),
        0 8px 24px rgba(15, 23, 42, 0.2);
    animation: login-brand-shine 2.4s ease-in-out infinite;
}

.login-brand h1::after {
    position: absolute;
    top: -16px;
    right: -34px;
    width: 12px;
    height: 12px;
    background: #facc15;
    box-shadow:
        -92px 7px 0 -4px #ffffff,
        -62px 31px 0 -2px #f9a8d4,
        -18px 38px 0 -3px #5eead4,
        24px 8px 0 -4px #fde68a,
        38px 36px 0 -3px #c4b5fd,
        -118px 28px 0 -5px #facc15;
    clip-path: polygon(50% 0, 62% 35%, 100% 50%, 62% 65%, 50% 100%, 38% 65%, 0 50%, 38% 35%);
    content: "";
    filter: drop-shadow(0 0 7px rgba(255, 255, 255, 0.78));
    animation: sidebar-star-dance 2s ease-in-out infinite;
}

@keyframes login-brand-shine {
    0%,
    100% {
        background-position: 0% 50%;
        filter: brightness(1);
    }

    45% {
        background-position: 100% 50%;
        filter: brightness(1.45);
    }

    70% {
        background-position: 65% 50%;
        filter: brightness(1.15);
    }
}

.login-brand p {
    color: var(--muted);
    font-weight: 800;
}

.brand-mark {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a, #2563eb 52%, #93c5fd);
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
    box-shadow:
        0 0 16px rgba(147, 197, 253, 0.82),
        0 0 30px rgba(37, 99, 235, 0.48);
}

.login-form,
.login-form label {
    display: grid;
    gap: 8px;
}

.form-message {
    color: var(--rose-dark);
    font-weight: 800;
}

.seller-page {
    padding: 24px;
}

.seller-product-list {
    display: grid;
    gap: 12px;
}

.seller-sales-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.seller-tools {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(140px, 1fr));
    gap: 10px;
}

.seller-date-row {
    display: grid;
    grid-template-columns: minmax(180px, 260px);
}

.seller-date-row label {
    display: grid;
    gap: 6px;
    color: #7c4564;
    font-weight: 900;
}

.seller-quick-categories,
.inventory-quick-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.inventory-quick-categories {
    border-bottom: 1px solid var(--line);
    padding: 16px 20px;
}

.seller-quick-categories button,
.inventory-quick-categories button {
    background: #ffffff;
    color: #be2f6d;
    box-shadow: none;
    border: 1px solid #eadde7;
}

.seller-quick-categories button:hover,
.seller-quick-categories button:focus,
.inventory-quick-categories button:hover,
.inventory-quick-categories button:focus,
.inventory-quick-categories button.active {
    background: #fff7fb;
    color: #be2f6d;
}

.inventory-quick-categories button.active {
    border-color: #d94683;
    box-shadow: 0 8px 18px rgba(217, 70, 131, 0.16);
}

.seller-product-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 120px;
    align-items: center;
    gap: 12px;
    border: 1px solid #eadde7;
    border-radius: 8px;
    background: #fff7fb;
    padding: 12px;
}

.seller-product-item.low {
    border-color: #fbbf24;
    background: #fffbeb;
}

.seller-product-item.is-filtered-out {
    display: none;
}

.seller-product-list.has-no-visible-products::after {
    border: 1px dashed #eadde7;
    border-radius: 8px;
    color: var(--muted);
    content: "Search or choose a category to see products.";
    font-weight: 900;
    padding: 16px;
    text-align: center;
}

.seller-product-list.has-no-visible-products:not(.is-waiting-for-search)::after {
    content: "No product matches this filter.";
}

.seller-product-item strong,
.seller-product-item small {
    display: block;
}

.seller-product-item strong {
    color: #1e3a8a;
    font-size: 17px;
    font-weight: 900;
}

.seller-product-item small {
    color: var(--muted);
    font-weight: 800;
}

.seller-qty-control {
    display: grid;
    grid-template-columns: 42px minmax(54px, 1fr) 42px;
    gap: 8px;
    align-items: center;
}

.seller-qty-control button {
    min-height: 42px;
    padding: 8px;
}

.seller-product-item input {
    min-height: 42px;
    text-align: center;
    font-weight: 900;
}

.seller-sale-summary {
    border: 1px solid #e8d2e2;
    border-radius: 8px;
    background: linear-gradient(135deg, #fff7fb, #f2edff);
    padding: 14px;
}

.seller-sale-summary strong {
    display: block;
    color: #be2f6d;
    font-size: 18px;
    font-weight: 900;
    margin-bottom: 6px;
}

.seller-sale-summary p {
    color: #463444;
    font-weight: 800;
}

.seller-submit-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 920px;
}

.sales-log-table {
    min-width: 0;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

td:first-child {
    max-width: 260px;
    color: #2f2433;
    font-weight: 900;
    white-space: normal;
}

th {
    background: #fffafd;
    color: #7c4564;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

td {
    color: #463444;
    font-weight: 650;
}

tbody tr:hover {
    background: #fff7fb;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.table-actions button {
    padding: 8px 10px;
}

.status-badge {
    display: inline-block;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    padding: 6px 9px;
}

.status-ok {
    background: #dcfce7;
    color: #166534;
}

.status-low {
    background: #fef3c7;
    color: #92400e;
}

.status-out {
    background: #fee2e2;
    color: #991b1b;
}

@media (max-width: 760px) {
    .app-layout {
        display: block;
    }

    .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }

    .sidebar nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .main-content {
        padding: 18px;
    }

    .inventory-filters {
        grid-template-columns: 1fr;
    }

    .seller-tools {
        grid-template-columns: 1fr;
    }

    .seller-date-row {
        grid-template-columns: 1fr;
    }

    .seller-product-item {
        grid-template-columns: 1fr;
    }

    .seller-qty-control {
        grid-template-columns: 52px minmax(80px, 1fr) 52px;
    }

    .seller-submit-row {
        flex-direction: column;
    }

    .topbar,
    .section-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .login-back-link {
        top: 12px;
        left: 12px;
        width: 40px;
        height: 40px;
        font-size: 23px;
    }

    .login-admin-menu {
        top: 12px;
        right: 12px;
    }

    .login-page {
        align-items: start;
        padding-top: 76px;
    }

    .inventory-table-wrap {
        overflow-x: visible;
    }

    table {
        min-width: 0;
    }

    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
        width: 100%;
    }

    thead {
        display: none;
    }

    tbody {
        display: grid;
        gap: 12px;
        padding: 14px;
    }

    tr {
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 12px 28px rgba(120, 72, 104, 0.08);
    }

    td {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 10px;
        border-bottom: 1px solid #f1e4ed;
        padding: 10px 12px;
        white-space: normal;
    }

    td:first-child {
        max-width: none;
        background: #fff7fb;
    }

    td:last-child {
        border-bottom: 0;
    }

    td::before {
        color: #9f4770;
        content: attr(data-label);
        font-size: 12px;
        font-weight: 900;
        text-transform: uppercase;
    }
}
