:root {
    --bg: #101014;
    --panel: rgba(255, 255, 255, 0.08);
    --panel-strong: rgba(255, 255, 255, 0.13);
    --ink: #f5f1e8;
    --muted: #b9b1c8;
    --line: rgba(255, 255, 255, 0.14);
    --field: rgba(255, 255, 255, 0.92);
    --field-ink: #20242c;
    --primary: #251f47;
    --primary-dark: #17132f;
    --accent: #b88a36;
    --danger: #b73535;
    --shadow: 0 18px 45px rgba(0, 0, 0, 0.28);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at 18% 12%, rgba(80, 58, 128, 0.48), transparent 28%),
        radial-gradient(circle at 88% 0%, rgba(184, 138, 54, 0.22), transparent 24%),
        linear-gradient(145deg, #101014 0%, #171326 52%, #0e0d12 100%);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.login-page {
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 25% 20%, rgba(80, 58, 128, 0.58), transparent 32%),
        radial-gradient(circle at 80% 10%, rgba(184, 138, 54, 0.30), transparent 26%),
        #101014;
}

.login-shell {
    width: min(100%, 420px);
}

.login-panel,
.cart-panel,
.table-wrap,
.stat-card,
.empty-panel,
.admin-panel,
.employee-card {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.login-panel {
    padding: 30px;
    border-color: rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.94);
    color: #20242c;
}

.brand-block,
.app-brand,
.section-heading,
.app-header,
.user-menu,
.totals div,
.cart-row,
.quantity-controls {
    display: flex;
    align-items: center;
}

.brand-block {
    gap: 14px;
    margin-bottom: 26px;
}

.brand-mark {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary), #513a80);
    color: #fff;
    font-weight: 800;
}

.site-logo {
    display: block;
    width: auto;
    max-width: 150px;
    height: 42px;
    object-fit: contain;
}

.login-logo {
    display: block;
    width: auto;
    max-width: 160px;
    height: 58px;
    object-fit: contain;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1,
h2 {
    margin: 0;
}

.login-form {
    display: grid;
    gap: 10px;
}

.login-form input,
.search-input,
.admin-panel input,
.admin-panel select,
.employee-form input,
.employee-form select,
.stock-form input,
.drawer-form input,
.drawer-form select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 12px;
    background: var(--field);
    color: var(--field-ink);
}

.login-panel .login-form input {
    border-color: #dce1e8;
    background: #fff;
}

.login-panel .login-form input.is-invalid,
.login-panel .login-form .prefixed-input.is-invalid,
.login-panel .login-form .password-field.is-invalid {
    border-color: #d42626;
    box-shadow: 0 0 0 3px rgba(212, 38, 38, 0.12);
}

.prefixed-input {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    min-height: 44px;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.prefixed-input span {
    display: inline-flex;
    align-items: center;
    align-self: stretch;
    padding: 0 0 0 12px;
    color: #20242c;
    font-weight: 700;
}

.login-panel .login-form .prefixed-input input {
    min-height: 42px;
    border: 0;
    padding-left: 2px;
}

.password-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 44px;
    border: 1px solid #dce1e8;
    border-radius: 6px;
    background: #fff;
    overflow: hidden;
}

.login-panel .login-form .password-field input {
    min-height: 42px;
    border: 0;
}

.password-field button {
    align-self: stretch;
    border: 0;
    border-left: 1px solid #dce1e8;
    background: #f3f4f6;
    color: #20242c;
    cursor: pointer;
    font-weight: 700;
    padding: 0 12px;
}

.login-panel .hint {
    color: #6a7280;
}

.primary-button,
.ghost-button,
.danger-button {
    min-height: 42px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 700;
}

.primary-button {
    border: 0;
    background: linear-gradient(135deg, #513a80, var(--primary));
    color: #fff;
    padding: 0 18px;
}

.primary-button:hover {
    background: var(--primary-dark);
}

.ghost-button {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
    padding: 0 12px;
}

.logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid rgba(255, 120, 120, 0.44);
    border-radius: 999px;
    background: rgba(183, 53, 53, 0.16);
    color: #ffd6d6;
    font-weight: 800;
}

.logout-button:hover {
    background: rgba(183, 53, 53, 0.28);
    color: #fff;
}

.danger-button {
    border: 1px solid rgba(255, 120, 120, 0.40);
    background: rgba(183, 53, 53, 0.18);
    color: #ffd6d6;
    padding: 0 12px;
}

.login-panel .ghost-button,
.login-panel .primary-button {
    color: #fff;
}

.full-width {
    width: 100%;
}

.hint,
.empty-state {
    color: var(--muted);
}

.hint {
    margin: 18px 0 0;
    font-size: 13px;
}

.alert {
    padding: 12px;
    border-radius: 6px;
}

.alert-error {
    background: #fff0f0;
    color: var(--danger);
}

.alert-success {
    background: rgba(75, 160, 110, 0.18);
    color: #bff2d1;
    border: 1px solid rgba(75, 160, 110, 0.35);
}

.login-panel .alert-success {
    background: #e8f6ee;
    color: #1f6b43;
    border: 1px solid #9bd3b4;
    font-weight: 700;
}

.app-header {
    position: sticky;
    top: 0;
    z-index: 10;
    justify-content: space-between;
    gap: 20px;
    min-height: 70px;
    padding: 0 24px;
    background: rgba(16, 16, 20, 0.84);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
}

.app-brand {
    gap: 10px;
    font-weight: 800;
}

.main-nav {
    display: flex;
    gap: 6px;
}

.main-nav a {
    padding: 10px 12px;
    border-radius: 6px;
    color: var(--muted);
    font-weight: 700;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
}

.user-menu {
    gap: 12px;
}

.app-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 22px;
    padding: 24px;
}

.pos-category-strip {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 14px 24px 0;
}

.category-filter {
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.07);
    color: var(--muted);
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}

.category-filter:hover,
.category-filter.is-active {
    border-color: rgba(184, 138, 54, 0.68);
    background: rgba(184, 138, 54, 0.18);
    color: var(--ink);
}

.page-shell {
    padding: 24px;
}

.workspace {
    min-width: 0;
}

.section-heading {
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.section-heading.compact {
    margin-bottom: 14px;
}

.search-input {
    max-width: 320px;
}

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

.product-card {
    display: grid;
    gap: 8px;
    min-height: 150px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.05));
    color: var(--ink);
    cursor: pointer;
    text-align: left;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.18);
}

.product-card[hidden] {
    display: none;
}

.product-image {
    display: block;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
}

.product-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 8px;
}

.product-card:hover {
    border-color: rgba(184, 138, 54, 0.72);
    background: linear-gradient(145deg, rgba(184, 138, 54, 0.18), rgba(255, 255, 255, 0.08));
}

.product-category,
.product-meta {
    color: var(--muted);
    font-size: 13px;
}

.product-price {
    align-self: end;
    color: #f1c66d;
    font-weight: 800;
}

.cart-panel {
    position: sticky;
    top: 94px;
    align-self: start;
    padding: 18px;
}

.cart-items {
    display: grid;
    gap: 10px;
    min-height: 180px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.cart-row {
    justify-content: space-between;
    gap: 12px;
}

.cart-row span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
}

.quantity-controls {
    gap: 8px;
}

.quantity-controls button {
    width: 30px;
    height: 30px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.10);
    color: var(--ink);
    cursor: pointer;
}

.totals {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.totals div {
    justify-content: space-between;
}

.totals dt {
    color: var(--muted);
}

.totals dd {
    margin: 0;
    font-weight: 800;
}

.grand-total {
    padding-top: 12px;
    border-top: 1px solid var(--line);
    font-size: 20px;
}

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.07);
}

th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.admin-grid {
    display: grid;
    grid-template-columns: 340px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.admin-panel,
.employee-card,
.empty-panel {
    padding: 18px;
}

.admin-panel,
.employee-form,
.stock-form,
.drawer-form {
    display: grid;
    gap: 12px;
}

.employee-list {
    display: grid;
    gap: 14px;
}

.employee-card {
    display: grid;
    gap: 14px;
}

.employee-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.employee-card-head h2 {
    margin-top: 8px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.form-grid label,
.admin-panel label {
    display: grid;
    gap: 6px;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
}

.checkbox-line input {
    width: auto;
    min-height: auto;
}

.role-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 6px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 800;
}

.role-badge {
    border: 1px solid rgba(184, 138, 54, 0.42);
    color: #f1c66d;
}

.status-badge.is-active {
    background: rgba(75, 160, 110, 0.18);
    color: #bff2d1;
}

.status-badge.is-inactive {
    background: rgba(183, 53, 53, 0.18);
    color: #ffd6d6;
}

.delete-form {
    justify-self: end;
}

.product-admin-grid {
    grid-template-columns: 360px minmax(0, 1fr);
}

.product-editor-card {
    gap: 16px;
}

.product-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: end;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.stock-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.stock-form label {
    display: grid;
    gap: 6px;
}

.inline-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 14px;
    text-decoration: none;
}

.minimal-admin,
.employee-admin-layout {
    display: grid;
    gap: 18px;
    justify-content: stretch;
    width: 100%;
}

.employee-admin-layout {
    max-width: min(1440px, calc(100vw - 48px));
    margin: 0 auto;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.15fr);
    align-items: start;
}

.minimal-create,
.minimal-row {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.055);
    backdrop-filter: blur(18px);
}

.minimal-row {
    width: fit-content;
    min-width: 520px;
    max-width: min(920px, calc(100vw - 48px));
}

.minimal-create summary,
.minimal-row summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 28px;
    gap: 18px;
    align-items: center;
    min-height: 64px;
    padding: 0 18px;
    cursor: pointer;
    list-style: none;
}

.minimal-row summary {
    grid-template-columns: auto 28px;
}

.employee-directory {
    gap: 10px;
}

.employee-grid {
    display: grid;
    grid-template-columns: minmax(170px, 1.2fr) minmax(130px, 0.8fr) minmax(110px, 0.7fr) minmax(100px, 0.7fr) 28px;
    column-gap: 28px;
    align-items: center;
}

.minimal-header {
    width: 100%;
    max-width: min(920px, calc(100vw - 48px));
    padding: 0 18px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.employee-directory .minimal-row {
    width: 100%;
    min-width: 0;
}

.employee-directory .minimal-row summary {
    grid-template-columns: minmax(170px, 1.2fr) minmax(130px, 0.8fr) minmax(110px, 0.7fr) minmax(100px, 0.7fr) 28px;
}

.role-management-panel,
.employee-management-panel {
    width: 100%;
    max-width: none;
    margin: 0;
}

.employee-management-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(18px);
}

.grade-panel {
    min-width: 0;
}

.grade-form {
    display: grid;
    gap: 12px;
}

.grade-grid {
    display: grid;
    grid-template-columns: minmax(160px, 0.8fr) 120px minmax(260px, 1.4fr) auto;
    gap: 24px;
    align-items: center;
}

.grade-row {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--ink);
}

.role-card {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(112px, 0.55fr);
    gap: 12px;
    align-items: stretch;
}

.role-access,
.role-actions {
    grid-column: 1 / -1;
}

.role-card-section {
    display: grid;
    align-content: start;
    gap: 8px;
    min-width: 0;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 8px;
    background: rgba(13, 11, 20, 0.24);
}

.role-actions {
    justify-items: start;
}

.field-caption {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.compact-number {
    display: grid;
    grid-template-columns: minmax(72px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.compact-number span {
    color: var(--muted);
    font-weight: 900;
}

.permission-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}

.permission-list label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.045);
}

.permission-list.expanded {
    padding: 10px 0;
}

.role-create {
    margin-top: 2px;
}

.role-create .drawer-form {
    padding: 0 18px 18px;
}

.employee-groups-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    align-items: start;
}

.employee-group-panel {
    width: 100%;
    max-width: none;
    margin: 0;
}

.product-directory-panel {
    width: fit-content;
}

.product-grid-row {
    display: grid;
    grid-template-columns: 58px minmax(160px, 1.25fr) minmax(110px, 0.8fr) minmax(82px, 0.6fr) minmax(82px, 0.6fr) minmax(170px, 1fr) minmax(86px, 0.6fr) 28px;
    column-gap: 22px;
    align-items: center;
}

.product-directory .minimal-row {
    width: min(1120px, calc(100vw - 48px));
    min-width: 0;
}

.product-directory .minimal-row summary {
    grid-template-columns: 58px minmax(160px, 1.25fr) minmax(110px, 0.8fr) minmax(82px, 0.6fr) minmax(82px, 0.6fr) minmax(170px, 1fr) minmax(86px, 0.6fr) 28px;
}

.product-row-image {
    display: block;
    width: 52px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.07);
    object-fit: cover;
}

.product-row-image.is-empty {
    position: relative;
}

.product-row-image.is-empty::after {
    content: "";
    position: absolute;
    inset: 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}

.product-category-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1120px, calc(100vw - 48px));
    margin: 18px 0 8px;
    padding: 10px 2px;
    border-bottom: 1px solid rgba(184, 138, 54, 0.34);
    color: var(--ink);
}

.product-category-heading strong {
    font-size: 15px;
    text-transform: uppercase;
}

.product-category-heading span {
    color: var(--muted);
    font-size: 13px;
}

.category-management .drawer-form {
    gap: 10px;
    width: min(380px, calc(100vw - 32px));
}

.category-create-form,
.category-rename-form,
.category-manager-row {
    display: grid;
    gap: 10px;
    align-items: center;
}

.category-create-form {
    grid-template-columns: minmax(220px, 1fr) auto;
    gap: 8px;
}

.category-manager-list {
    display: grid;
    gap: 8px;
}

.category-manager-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
}

.category-manager-row.is-dragging {
    opacity: 0.58;
}

.category-manager-main,
.category-manager-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.category-manager-main {
    min-width: 0;
}

.category-manager-main strong,
.category-manager-main span {
    display: block;
}

.category-manager-main span {
    color: var(--muted);
    font-size: 12px;
}

.category-drag-handle {
    display: grid;
    width: 26px;
    height: 30px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
    cursor: grab;
    font-weight: 800;
}

.category-manager-actions .delete-form {
    display: block;
}

.category-rename-form {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--line);
}

.category-rename-form label {
    display: grid;
    gap: 4px;
}

.category-management input {
    min-height: 36px;
}

.category-management .primary-button,
.category-management .ghost-button,
.category-management .danger-button {
    min-height: 36px;
    padding: 0 12px;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.product-grid-row strong,
.employee-grid strong {
    display: block;
}

.minimal-create summary::-webkit-details-marker,
.minimal-row summary::-webkit-details-marker {
    display: none;
}

.minimal-create summary::after,
.minimal-row summary::after {
    content: "+";
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--muted);
}

.minimal-create[open] summary::after,
.minimal-row[open] summary::after {
    content: "-";
}

.minimal-create summary {
    font-weight: 800;
}

.summary-meta,
.row-meta {
    color: var(--muted);
    font-size: 13px;
}

.row-main,
.row-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.row-main strong {
    min-width: 160px;
}

.employee-directory .row-main strong {
    min-width: 0;
}

.row-main span,
.row-meta span {
    white-space: nowrap;
}

.minimal-list {
    display: grid;
    gap: 8px;
    justify-content: stretch;
    width: 100%;
}

.directory-panel {
    display: grid;
    gap: 12px;
    width: fit-content;
    max-width: min(980px, calc(100vw - 48px));
    margin: 0 auto;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    backdrop-filter: blur(18px);
}

.directory-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 24px;
}

.directory-title h2 {
    font-size: 18px;
}

.directory-title span,
.directory-empty {
    color: var(--muted);
    font-size: 13px;
}

.directory-empty {
    margin: 0;
    padding: 12px 18px;
}

.catalog-empty {
    padding: 18px;
    color: var(--muted);
}

.minimal-details {
    display: grid;
    gap: 14px;
    padding: 0 18px 18px;
    width: min(720px, calc(100vw - 48px));
}

.minimal-details::before {
    content: "";
    height: 1px;
    background: var(--line);
}

.drawer-form {
    padding-top: 4px;
}

.drawer-form .primary-button,
.product-actions .ghost-button,
.delete-form .danger-button {
    justify-self: start;
}

.hr-action-row {
    display: grid;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.hr-action-form {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.hr-action-form input {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
}

.floating-actions {
    position: fixed;
    display: grid;
    justify-items: end;
    gap: 10px;
    right: 24px;
    bottom: 24px;
    z-index: 30;
}

.floating-create {
    position: relative;
}

.floating-create summary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 18px;
    border: 1px solid rgba(184, 138, 54, 0.42);
    border-radius: 999px;
    background: linear-gradient(135deg, #513a80, var(--primary));
    color: #fff;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.34);
    cursor: pointer;
    list-style: none;
}

.floating-create summary::-webkit-details-marker {
    display: none;
}

.floating-create summary::after {
    content: none;
}

.floating-create .fab-label {
    font-weight: 800;
}

.floating-create .fab-plus {
    display: grid;
    width: 28px;
    height: 28px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 999px;
    font-size: 20px;
    line-height: 1;
}

.floating-create[open] .fab-plus {
    transform: rotate(45deg);
}

.floating-create .drawer-form {
    position: absolute;
    right: 0;
    bottom: calc(100% + 10px);
    width: min(420px, calc(100vw - 32px));
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(25, 22, 35, 0.96);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.floating-create textarea {
    width: 100%;
    resize: vertical;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
    font: inherit;
}

.stat-card {
    display: grid;
    gap: 8px;
    padding: 20px;
}

.stat-card span {
    color: var(--muted);
}

.stat-card strong {
    font-size: 28px;
}

.accounting-panel {
    display: grid;
    gap: 14px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    backdrop-filter: blur(18px);
}

.accounting-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 14px;
}

.sales-accounting-panel {
    margin-top: 14px;
}

.accounting-table-wrap {
    overflow: auto;
}

.accounting-table {
    min-width: 1180px;
}

.sales-table {
    min-width: 980px;
}

.hr-history-table {
    min-width: 1040px;
}

.accounting-table th {
    border: 0;
    background: linear-gradient(135deg, var(--primary), #3a2d63);
    color: #fff;
    text-align: center;
}

.accounting-table th:first-child {
    border-radius: 999px 0 0 999px;
}

.accounting-table th:last-child {
    border-radius: 0 999px 999px 0;
}

.accounting-table th small {
    display: block;
    font-size: 10px;
    line-height: 1;
}

.accounting-table td {
    background: rgba(255, 255, 255, 0.035);
}

.accounting-table td:nth-child(n+5) {
    text-align: right;
    font-weight: 700;
}

.table-input {
    width: 100%;
    min-width: 90px;
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 6px;
    padding: 0 8px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
    font-weight: 700;
}

.money-input,
.percent-input {
    text-align: right;
}

.accounting-save-button {
    justify-self: end;
}

.accounting-table .salary-cell {
    background: rgba(75, 160, 110, 0.16);
    color: #7be0b1;
}

.accounting-table .total-cell {
    background: rgba(184, 138, 54, 0.14);
    color: #f1c66d;
}

.masked-info {
    display: inline-block;
    min-width: 64px;
    filter: blur(5px);
    opacity: 0.58;
    user-select: none;
}

.accounting-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1.6fr auto;
    gap: 12px;
    align-items: end;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.accounting-summary label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-weight: 700;
}

.accounting-summary input {
    min-height: 38px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0 12px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--ink);
    font-weight: 800;
}

.accounting-total-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 14px;
    background: rgba(184, 138, 54, 0.14);
    color: #f1c66d;
    font-weight: 800;
}

.sale-item {
    display: block;
    color: var(--muted);
    line-height: 1.5;
}

.hr-history-panel {
    max-width: 1240px;
    margin: 0 auto;
}

.expense-panel {
    margin-top: 14px;
}

.expense-request-list {
    display: grid;
    gap: 10px;
}

.expense-request {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
}

.expense-request strong,
.expense-request span {
    display: block;
}

.expense-request p {
    margin: 8px 0 0;
    color: var(--muted);
}

.expense-request-actions {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.expense-request-actions form {
    display: flex;
    gap: 8px;
}

.expense-status {
    padding: 6px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-weight: 800;
}

.expense-status-approved {
    border-color: rgba(123, 224, 177, 0.32);
    color: #7be0b1;
}

.expense-status-rejected {
    border-color: rgba(255, 111, 111, 0.32);
    color: #ff9b9b;
}

.employee-admin-layout .directory-panel,
.employee-management-panel {
    background: rgba(255, 255, 255, 0.028);
}

.employee-admin-layout .directory-title {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

.employee-admin-layout .directory-title h2 {
    margin: 0;
}

.employee-admin-layout .directory-title span {
    display: block;
    margin-top: 4px;
}

.employee-admin-layout .role-card {
    grid-template-columns: minmax(0, 1fr) 112px;
    gap: 14px;
    align-items: center;
    padding: 12px 0;
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
    overflow: hidden;
}

.employee-admin-layout .role-card:last-of-type {
    border-bottom: 0;
}

.employee-admin-layout .role-card-section {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.employee-admin-layout .role-access,
.employee-admin-layout .role-actions {
    grid-column: 1 / -1;
}

.employee-admin-layout .permission-list {
    gap: 6px;
    min-width: 0;
}

.employee-admin-layout .permission-list label {
    min-height: 28px;
    padding: 0 9px;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.035);
    font-size: 12px;
}

.employee-admin-layout .grade-form > .primary-button {
    justify-self: end;
    min-width: 220px;
}

.employee-admin-layout .role-actions {
    display: flex;
    justify-content: flex-end;
}

.employee-admin-layout .role-create {
    border-color: rgba(255, 255, 255, 0.13);
    background: rgba(255, 255, 255, 0.035);
}

.employee-management-panel .employee-groups-grid {
    gap: 18px;
}

.employee-management-panel .employee-group-panel {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.employee-management-panel .employee-group-panel + .employee-group-panel {
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.employee-management-panel .employee-group-panel > .directory-title {
    padding: 0 0 8px;
    border-bottom: 0;
}

.employee-management-panel .minimal-header {
    max-width: none;
    padding: 0 18px 8px;
    border-bottom: 1px solid var(--line);
}

.employee-management-panel .minimal-row {
    border-width: 0 0 1px;
    border-radius: 0;
    background: transparent;
    backdrop-filter: none;
}

.employee-management-panel .minimal-row:last-child {
    border-bottom: 0;
}

.employee-management-panel .minimal-row summary {
    min-height: 56px;
    padding: 0 18px;
}

.employee-management-panel .minimal-row:hover {
    background: rgba(255, 255, 255, 0.045);
}

.employee-management-panel .directory-empty {
    padding: 18px;
    border-top: 1px solid var(--line);
}

@media (max-width: 1180px) {
    .employee-admin-layout {
        grid-template-columns: 1fr;
    }

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

    .role-access,
    .role-actions {
        grid-column: 1 / -1;
    }

    .employee-groups-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .app-header,
    .app-layout {
        grid-template-columns: 1fr;
    }

    .app-header {
        position: static;
        align-items: flex-start;
        flex-direction: column;
        padding: 16px;
    }

    .app-layout {
        display: block;
        padding: 16px;
    }

    .pos-category-strip {
        padding: 12px 16px 0;
    }

    .cart-panel {
        position: static;
        margin-top: 18px;
    }

    .section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .search-input {
        max-width: none;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .admin-grid,
    .form-grid,
    .product-actions,
    .stock-form,
    .category-create-form,
    .category-rename-form,
    .category-manager-row,
    .accounting-summary,
    .role-card,
    .employee-groups-grid {
        grid-template-columns: 1fr;
    }

    .minimal-create summary,
    .minimal-row summary {
        grid-template-columns: minmax(0, 1fr) 28px;
        min-height: auto;
        padding: 14px;
    }

    .minimal-admin,
    .employee-admin-layout,
    .minimal-list {
        justify-content: stretch;
    }

    .directory-panel {
        width: 100%;
        max-width: none;
        padding: 14px;
    }

    .directory-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .minimal-row {
        width: 100%;
        min-width: 0;
        max-width: none;
    }

    .summary-meta,
    .row-meta {
        grid-column: 1 / -1;
    }

    .row-main,
    .row-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .minimal-header {
        display: none;
    }

    .employee-grid,
    .employee-directory .minimal-row summary,
    .product-grid-row,
    .product-directory .minimal-row summary,
    .grade-grid {
        grid-template-columns: minmax(0, 1fr) 28px;
        row-gap: 4px;
    }

    .grade-panel {
        min-width: 0;
    }

    .grade-grid {
        grid-template-columns: 1fr;
    }

    .role-card-section {
        padding: 10px;
    }

    .role-actions {
        justify-items: stretch;
    }

    .role-actions .danger-button {
        width: 100%;
    }

    .employee-management-panel {
        padding: 14px;
    }

    .employee-directory .minimal-row summary > span:not(.row-main),
    .product-directory .minimal-row summary > span:not(:first-child) {
        grid-column: 1;
    }

    .row-main strong {
        min-width: 0;
    }

    .minimal-details {
        width: auto;
        padding: 0 14px 14px;
    }

    .floating-actions {
        right: 16px;
        bottom: 16px;
    }

    .floating-create summary {
        min-height: 48px;
        padding: 0 14px;
    }

    .floating-create .fab-label {
        display: none;
    }

    .floating-create .drawer-form {
        right: 0;
        bottom: 60px;
    }
}

.employee-page {
    max-width: 1320px;
    margin: 0 auto;
}

.employee-topbar {
    align-items: flex-end;
}

.employee-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.employee-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.employee-stat,
.employee-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.employee-stat {
    display: grid;
    gap: 6px;
    min-height: 92px;
    padding: 16px;
}

.employee-stat span,
.employee-panel-head span,
.employee-table td span,
.role-line span {
    color: var(--muted);
    font-size: 13px;
}

.employee-stat strong {
    font-size: 30px;
    line-height: 1;
}

.employee-dashboard {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
    gap: 16px;
    align-items: start;
}

.employee-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.employee-panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.employee-panel-head h2 {
    font-size: 18px;
}

.employee-table-wrap {
    overflow: auto;
}

.employee-table {
    min-width: 760px;
}

.employee-table th {
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.employee-table td {
    padding: 14px 12px;
    vertical-align: middle;
}

.employee-table td:first-child {
    display: grid;
    gap: 4px;
}

.employee-actions-cell {
    white-space: nowrap;
    text-align: right;
}

.compact-action {
    min-height: 34px;
    padding: 0 10px;
    font-size: 13px;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    border-radius: 999px;
    padding: 0 10px;
    font-size: 12px;
    font-weight: 800;
}

.status-pill.is-active {
    border: 1px solid rgba(123, 224, 177, 0.32);
    background: rgba(75, 160, 110, 0.16);
    color: #bff2d1;
}

.status-pill.is-inactive {
    border: 1px solid rgba(255, 120, 120, 0.32);
    background: rgba(183, 53, 53, 0.16);
    color: #ffd6d6;
}

.role-list {
    display: grid;
    gap: 8px;
}

.role-line {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.035);
    cursor: grab;
    transition: border-color 0.16s ease, opacity 0.16s ease, transform 0.16s ease;
}

.role-line.is-dragging {
    opacity: 0.58;
    border-color: rgba(184, 138, 54, 0.72);
    transform: scale(0.99);
}

.drag-handle {
    display: grid;
    width: 26px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 6px;
    color: var(--muted);
    font-weight: 900;
    line-height: 1;
}

.role-line div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.role-line strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-modal {
    width: min(720px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 32px));
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 0;
    background: rgba(23, 19, 36, 0.98);
    color: var(--ink);
    box-shadow: var(--shadow);
}

.app-modal::backdrop {
    background: rgba(5, 5, 8, 0.68);
    backdrop-filter: blur(6px);
}

.modal-form {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.modal-head {
    display: grid;
    gap: 4px;
    padding-right: 38px;
}

.modal-close-form {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
}

.modal-close-form button {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--muted);
    cursor: pointer;
    font-weight: 800;
}

.modal-form input,
.modal-form select,
.hr-modal-actions input {
    width: 100%;
    min-height: 42px;
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0 12px;
    background: var(--field);
    color: var(--field-ink);
}

.modal-form label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-weight: 700;
    text-align: left;
}

.modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

.employee-profile-form {
    gap: 18px;
}

.employee-profile-form .modal-head {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.modal-section {
    display: grid;
    gap: 12px;
}

.modal-section h3 {
    margin: 0;
    color: var(--accent);
    font-size: 12px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.modal-section .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-profile-form .modal-section:first-of-type .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.employee-profile-form .modal-section:first-of-type .form-grid label:last-child {
    grid-column: 1 / -1;
}

.modal-security-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.switch-line {
    display: inline-grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.055);
    color: var(--ink);
    white-space: nowrap;
}

.modal-form .switch-line input[type="checkbox"] {
    position: relative;
    width: 42px;
    min-width: 42px;
    height: 24px;
    min-height: 24px;
    margin: 0;
    appearance: none;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    cursor: pointer;
}

.modal-form .switch-line input[type="checkbox"]::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: var(--muted);
    transition: transform 0.16s ease, background 0.16s ease;
}

.modal-form .switch-line input[type="checkbox"]:checked {
    border-color: rgba(123, 224, 177, 0.42);
    background: rgba(75, 160, 110, 0.30);
}

.modal-form .switch-line input[type="checkbox"]:checked::after {
    transform: translateX(18px);
    background: #bff2d1;
}

.role-create-form .modal-head {
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.role-config-grid {
    grid-template-columns: minmax(0, 1fr) 140px;
}

.modal-permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 10px;
}

.permission-tile {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    min-height: 46px;
    padding: 0 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.045);
    color: var(--ink);
}

.modal-form .permission-tile input[type="checkbox"] {
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    margin: 0;
    accent-color: var(--accent);
}

.permission-tile:has(input:checked) {
    border-color: rgba(184, 138, 54, 0.72);
    background: rgba(184, 138, 54, 0.14);
}

.permission-tile span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hr-modal-actions {
    display: grid;
    gap: 10px;
}

.hr-modal-actions .hr-action-form {
    grid-template-columns: minmax(0, 1fr) 132px;
}

.modal-delete-form {
    display: flex;
    justify-content: flex-end;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

@media (max-width: 900px) {
    .employee-topbar {
        align-items: stretch;
    }

    .employee-toolbar {
        justify-content: stretch;
    }

    .employee-toolbar .primary-button,
    .employee-toolbar .ghost-button {
        flex: 1;
    }

    .employee-stats-grid,
    .employee-dashboard {
        grid-template-columns: 1fr;
    }

    .employee-panel {
        padding: 14px;
    }

    .role-line {
        align-items: stretch;
        grid-template-columns: auto minmax(0, 1fr);
    }

    .role-line .compact-action {
        grid-column: 1 / -1;
        width: 100%;
    }

    .hr-modal-actions .hr-action-form {
        grid-template-columns: 1fr;
    }

    .modal-section .form-grid,
    .employee-profile-form .modal-section:first-of-type .form-grid,
    .modal-security-row,
    .role-config-grid {
        grid-template-columns: 1fr;
    }

    .switch-line {
        justify-content: start;
    }

    .modal-actions {
        justify-content: stretch;
    }

    .modal-actions button,
    .modal-delete-form button {
        width: 100%;
    }
}
