@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap");

:root {
    --black: #090909;
    --ink: #171717;
    --muted: #6d6d6d;
    --line: #dedede;
    --paper: #ffffff;
    --soft: #f5f5f5;
    --red: #d71920;
    --red-dark: #a90f15;
    --shadow: 0 18px 50px rgba(0, 0, 0, 0.09);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #eeeeee;
    color: var(--ink);
    font-family: "Inter", "Segoe UI Variable", "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 15px;
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
    line-height: 1.45;
}

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

.topbar {
    align-items: center;
    background: var(--black);
    color: #fff;
    display: flex;
    justify-content: space-between;
    min-height: 76px;
    padding: 14px clamp(16px, 4vw, 42px);
}

.brand {
    align-items: center;
    display: flex;
    gap: 16px;
}

.sheet-header img {
    filter: brightness(0);
}

.brand-logo {
    align-items: center;
    display: inline-flex;
    height: 50px;
    justify-content: center;
    width: 190px;
}

.brand-logo img {
    height: 50px;
    max-width: 170px;
    object-fit: contain;
    width: 100%;
}

.brand strong,
.brand span {
    display: block;
}

.brand strong {
    font-size: 18px;
}

.brand span {
    color: #cccccc;
    font-size: 13px;
    margin-top: 2px;
}

.layout {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) 380px;
    padding: 24px clamp(16px, 4vw, 42px);
}

.panel {
    background: var(--paper);
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: clamp(18px, 3vw, 28px);
}

.section-head {
    align-items: flex-start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 22px;
}

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

.eyebrow {
    color: var(--red);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    margin: 0 0 6px;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 850;
    line-height: 1;
    margin-bottom: 0;
}

h2 {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 0;
}

h3 {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
}

.button,
button {
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    font-weight: 750;
}

.button {
    align-items: center;
    display: inline-flex;
    gap: 8px;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
}

.top-actions .button {
    font-size: 15px;
}

.button-icon {
    align-items: center;
    display: inline-flex;
    height: 17px;
    justify-content: center;
    width: 17px;
}

.button-icon svg {
    fill: none;
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
    width: 17px;
}

.button-primary {
    background: var(--red);
    color: #fff;
}

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

.button-dark {
    background: #fff;
    color: var(--black);
}

.button-outline {
    background: #fff;
    border: 1px solid var(--line);
}

.top-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.menu-toggle {
    align-items: center;
    background: #fff;
    color: var(--black);
    display: none;
    height: 42px;
    justify-content: center;
    padding: 0;
    width: 46px;
}

.header-outline {
    background: transparent;
    border-color: #4a4a4a;
    color: #fff;
}

.alert {
    background: #fff1f1;
    border: 1px solid #ffb8b8;
    border-radius: 6px;
    color: #8c1010;
    margin-bottom: 18px;
    padding: 12px;
}

.alert.success {
    background: #f3fff6;
    border-color: #b8e6c1;
    color: #116220;
}

.task-form {
    display: grid;
    gap: 18px;
}

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

label span {
    display: block;
    font-size: 13px;
    font-weight: 800;
    margin-bottom: 7px;
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid #d5d5d5;
    border-radius: 6px;
    color: var(--ink);
    font: inherit;
    min-height: 42px;
    padding: 10px 11px;
    width: 100%;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--red);
    outline: 2px solid rgba(215, 25, 32, 0.14);
}

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

.category {
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 14px;
}

.category-title {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.rows {
    display: grid;
    gap: 10px;
}

.category-add-row {
    margin-top: 12px;
    min-height: 38px;
    width: 100%;
}

.preset-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.preset-sidebar {
    align-self: start;
}

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

.preset-sidebar-category {
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 13px;
}

.preset-sidebar-category .category-title {
    margin-bottom: 10px;
}

.preset-sidebar-category .icon-button {
    height: 34px;
    width: 34px;
}

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

.preset-pick-row {
    align-items: stretch;
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.preset-pick {
    align-items: center;
    background: #f6f6f6;
    border: 1px solid #dedede;
    border-left: 3px solid var(--red);
    border-radius: 7px;
    cursor: pointer;
    display: grid;
    gap: 9px;
    grid-template-columns: 18px minmax(0, 1fr);
    padding: 9px;
}

.preset-actions {
    display: grid;
    gap: 6px;
    grid-template-columns: 34px;
}

.small-icon-button {
    align-items: center;
    background: #eeeeee;
    color: var(--black);
    display: inline-flex;
    height: 34px;
    justify-content: center;
    padding: 0;
    width: 34px;
}

.small-icon-button.danger {
    color: var(--red);
}

.small-icon-button svg {
    fill: none;
    height: 17px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
    width: 17px;
}

.preset-pick input {
    accent-color: var(--red);
    min-height: 16px;
    width: 16px;
}

.preset-pick strong,
.preset-pick em {
    display: block;
}

.preset-pick strong {
    font-size: 13px;
    overflow-wrap: anywhere;
}

.preset-pick em {
    color: var(--muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    margin-top: 2px;
    text-transform: uppercase;
}

.check-pill {
    align-items: center;
    background: #f4f4f4;
    border: 1px solid #dddddd;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    gap: 7px;
    min-height: 34px;
    padding: 7px 9px;
}

.check-pill input {
    accent-color: var(--red);
    min-height: 16px;
    width: 16px;
}

.check-pill span {
    font-size: 13px;
    font-weight: 800;
    margin: 0;
}

.check-pill em {
    color: var(--muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    text-transform: uppercase;
}

.item-row {
    display: grid;
    gap: 8px;
    grid-template-columns: 132px minmax(180px, 1fr) 170px 130px 36px 36px;
}

.category[data-category='altele'] .item-row {
    grid-template-columns: minmax(180px, 1fr) 170px 130px 36px 36px;
}

.icon-button {
    align-items: center;
    background: var(--black);
    color: #fff;
    display: inline-flex;
    height: 36px;
    justify-content: center;
    padding: 0;
    width: 36px;
}

.remove-row {
    background: #eeeeee;
    color: var(--black);
}

.row-preset-pick {
    background: var(--black);
    color: #fff;
}

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

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

.task-card {
    border: 1px solid #e4e4e4;
    border-left: 4px solid var(--red);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 13px;
}

.task-card strong,
.task-card span,
.task-card small {
    display: block;
}

.task-card span,
.task-card small,
.empty {
    color: var(--muted);
    font-size: 13px;
}

.task-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.task-actions a,
.task-actions button {
    background: #f1f1f1;
    border-radius: 6px;
    color: var(--black);
    font-size: 13px;
    font-weight: 800;
    min-height: 34px;
    padding: 8px 10px;
}

.task-actions button {
    color: var(--red);
}

.print-body {
    background: #d9d9d9;
    padding: 24px;
}

.settings-layout {
    display: grid;
    gap: 20px;
    padding: 24px clamp(16px, 4vw, 42px);
}

.settings-shell {
    display: grid;
    gap: 24px;
    grid-template-columns: 280px minmax(0, 1fr);
    padding: 28px clamp(16px, 4vw, 42px);
}

.settings-sidebar {
    min-width: 0;
}

.settings-sidebar-card {
    background: var(--black);
    border: 1px solid #262626;
    border-radius: 10px;
    box-shadow: var(--shadow);
    color: #fff;
    min-height: calc(100vh - 156px);
    padding: 20px;
    position: sticky;
    top: 104px;
}

.settings-sidebar-card h2 {
    font-size: 24px;
    margin-bottom: 18px;
}

.settings-nav {
    display: grid;
    border-bottom: 1px solid #272727;
    border-top: 1px solid #272727;
    gap: 0;
}

.settings-nav a,
.settings-nav-form button {
    align-items: center;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #272727;
    border-radius: 0;
    color: #f7f7f7;
    display: flex;
    gap: 10px;
    font-weight: 750;
    justify-content: flex-start;
    min-height: 58px;
    padding: 12px 0;
    text-align: left;
    transition: background 0.16s ease, color 0.16s ease, padding-left 0.16s ease;
    width: 100%;
}

.settings-nav a:last-child,
.settings-nav-form button {
    border-bottom: 0;
}

.settings-nav a:hover,
.settings-nav-form button:hover {
    background: #151515;
    color: #fff;
    padding-left: 8px;
}

.settings-nav a.active {
    background: #171717;
    color: #fff;
    padding-left: 8px;
}

.settings-nav a.active .module-icon.mini {
    background: var(--red);
    border-color: var(--red);
}

.settings-nav-form {
    margin: 0;
}

.module-icon.mini {
    background: #151515;
    border: 1px solid #393939;
    border-radius: 7px;
    flex: 0 0 auto;
    height: 32px;
    width: 32px;
}

.module-icon.mini svg {
    height: 17px;
    width: 17px;
}

.settings-content {
    display: grid;
    gap: 20px;
    min-width: 0;
}

.settings-hero {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.settings-hero h1 {
    font-size: clamp(34px, 4vw, 52px);
}

.settings-hero p:not(.eyebrow) {
    color: var(--muted);
    font-weight: 500;
    margin: 8px 0 0;
}

.settings-section {
    display: grid;
    gap: 16px;
}

.settings-section-head {
    padding: 4px 2px 0;
}

.settings-section-head h1 {
    font-size: clamp(28px, 3vw, 42px);
}

.dashboard-layout {
    display: grid;
    gap: 20px;
    padding: 24px clamp(16px, 4vw, 42px);
}

.dashboard-hero {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.dashboard-hero .eyebrow {
    font-size: 11px;
    font-weight: 900;
    margin-bottom: 8px;
}

.dashboard-hero h1 {
    font-size: clamp(38px, 4vw, 56px);
    font-weight: 850;
}

.dashboard-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(360px, 0.85fr) minmax(0, 1.15fr);
}

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

.module-tile {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-left: 5px solid var(--red);
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: grid;
    gap: 10px;
    min-height: 150px;
    padding: 18px;
}

.module-tile:hover {
    border-color: #d0d0d0;
    transform: translateY(-1px);
}

.module-icon {
    align-items: center;
    background: var(--black);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.module-icon svg {
    fill: none;
    height: 22px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
    width: 22px;
}

.module-tile strong {
    font-size: 21px;
    font-weight: 820;
    line-height: 1.1;
}

.module-tile small {
    color: var(--muted);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1.35;
}

.dashboard-task-list {
    display: grid;
    gap: 10px;
}

.dashboard-task {
    align-items: center;
    border: 1px solid #e4e4e4;
    border-left: 4px solid var(--red);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: minmax(0, 1fr) 150px;
    padding: 12px;
}

.dashboard-task strong,
.dashboard-task span,
.dashboard-task small {
    display: block;
}

.dashboard-task span,
.dashboard-task small {
    color: var(--muted);
    font-size: 12px;
}

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

.assigned-row {
    align-items: center;
    background: #fbfbfb;
    border: 1px solid #e4e4e4;
    border-left: 4px solid var(--red);
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(0, 1fr) 180px;
    padding: 14px;
}

.assigned-row strong,
.assigned-row span,
.assigned-row small {
    display: block;
}

.assigned-row span,
.assigned-row small {
    color: var(--muted);
}

.assigned-row small {
    font-size: 12px;
    margin-top: 3px;
}

.view-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.compact-folder-list {
    display: grid;
    gap: 10px;
}

.compact-folder-list details {
    background: #f7f7f7;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
}

.compact-folder-list summary {
    cursor: pointer;
    font-weight: 800;
}

.folder-link {
    background: #fff;
    border-left: 3px solid var(--red);
    border-radius: 6px;
    display: block;
    font-size: 13px;
    margin-top: 8px;
    padding: 9px;
}

.folder-link-actions {
    align-items: center;
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.folder-link-actions > a {
    font-weight: 800;
    min-width: 0;
}

.folder-link-actions button {
    background: #f1f1f1;
    border-radius: 6px;
    color: var(--black);
    font-size: 12px;
    font-weight: 800;
    min-height: 30px;
    padding: 6px 9px;
}

.login-body {
    align-items: center;
    background: #fff;
    display: flex;
    min-height: 100vh;
    justify-content: center;
    padding: 20px;
}

.login-panel {
    background: var(--black);
    border: 2px solid var(--black);
    border-radius: 8px;
    color: #fff;
    display: grid;
    gap: 22px;
    max-width: 420px;
    padding: 28px;
    width: 100%;
}

.login-panel img {
    height: 68px;
    object-fit: contain;
    width: 210px;
}

.login-panel label span {
    color: #fff;
}

.login-panel input {
    background: #fff;
    color: var(--black);
}

.login-form,
.user-form {
    display: grid;
    gap: 14px;
}

.user-form {
    align-items: end;
    background: #fbfbfb;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    grid-template-columns: minmax(180px, 240px) minmax(180px, 240px) auto minmax(280px, 1fr) auto;
    margin-bottom: 18px;
    padding: 16px;
}

.user-management-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: minmax(320px, 0.8fr) minmax(420px, 1.2fr);
}

.user-create-card,
.user-list-card {
    background: #fbfbfb;
    border: 1px solid #e6e6e6;
    border-radius: 10px;
    display: grid;
    gap: 16px;
    padding: 18px;
}

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

.permission-box {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 8px;
    display: grid;
    gap: 12px;
    padding: 12px;
}

.permission-box.compact {
    background: #fbfbfb;
}

.check-inline {
    align-items: center;
    display: flex;
    gap: 8px;
    min-height: 42px;
}

.check-inline input,
.tiny-check input {
    accent-color: var(--red);
    min-height: 16px;
    width: 16px;
}

.category-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.category-checks .check-pill {
    background: #fff;
}

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

.user-card {
    background: #fff;
    border: 1px solid #e3e3e3;
    border-left: 4px solid var(--red);
    border-radius: 9px;
    padding: 14px;
}

.user-card-top {
    align-items: center;
    display: grid;
    gap: 12px;
    grid-template-columns: 42px minmax(0, 1fr) auto auto;
}

.user-avatar {
    align-items: center;
    background: var(--black);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    font-weight: 850;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.user-card strong,
.user-card span {
    display: block;
}

.user-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.user-edit-details {
    position: relative;
}

.user-edit-details summary {
    background: #f1f1f1;
    border-radius: 7px;
    cursor: pointer;
    font-weight: 800;
    list-style: none;
    min-height: 36px;
    padding: 8px 12px;
}

.user-edit-details summary::-webkit-details-marker {
    display: none;
}

.user-edit-details[open] {
    grid-column: 1 / -1;
}

.user-row {
    align-items: center;
    border: 1px solid #e3e3e3;
    border-left: 4px solid var(--red);
    border-radius: 8px;
    display: grid;
    gap: 12px;
    grid-template-columns: 180px minmax(0, 1fr) auto;
    padding: 12px;
}

.user-row strong,
.user-row span {
    display: block;
}

.user-row span {
    color: var(--muted);
    font-size: 12px;
}

.user-edit-form {
    background: #fff;
    border-top: 1px solid #eeeeee;
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(180px, 1fr));
    margin-top: 14px;
    padding-top: 14px;
}

.user-edit-form input[type='text'],
.user-edit-form input[type='password'],
.user-edit-form input:not([type]) {
    max-width: none;
}

.user-edit-form .permission-box,
.user-edit-form .button {
    grid-column: 1 / -1;
}

.tiny-check {
    align-items: center;
    display: inline-flex;
    font-size: 12px;
    gap: 4px;
}

.preset-form {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns: 210px 180px minmax(260px, 1fr) auto;
}

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

.preset-panel {
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.07);
}

.preset-admin-list {
    display: grid;
    gap: 10px;
}

.preset-admin-row {
    align-items: center;
    background: #fbfbfb;
    border: 1px solid #e6e6e6;
    border-left: 4px solid var(--red);
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 13px 14px;
}

.preset-admin-row > div:first-child {
    min-width: 0;
}

.preset-row-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 8px;
}

.preset-admin-row strong,
.preset-admin-row span {
    display: block;
}

.preset-admin-row span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    margin-top: 2px;
    text-transform: uppercase;
}

.preset-admin-row button,
.preset-row-actions button {
    background: #f1f1f1;
    border-radius: 7px;
    color: var(--red);
    font-size: 13px;
    font-weight: 800;
    min-height: 34px;
    padding: 8px 10px;
}

.preset-row-actions .preset-edit {
    color: var(--black);
}

.users-panel {
    overflow: hidden;
}

.password-panel {
    overflow: hidden;
}

.password-form {
    align-items: end;
    background: #fbfbfb;
    border: 1px solid #e6e6e6;
    border-radius: 8px;
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(180px, 1fr)) auto;
    padding: 16px;
}

.modal {
    border: 0;
    border-radius: 8px;
    max-width: min(520px, calc(100vw - 28px));
    padding: 0;
    width: 520px;
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.modal-card {
    background: #fff;
    display: grid;
    gap: 14px;
    padding: 22px;
}

.modal-close {
    background: #eeeeee;
    color: var(--black);
}

.picker-list {
    display: grid;
    gap: 9px;
    max-height: 360px;
    overflow: auto;
}

.picker-row {
    align-items: center;
    background: #f6f6f6;
    border: 1px solid #dedede;
    border-left: 4px solid var(--red);
    border-radius: 8px;
    color: var(--black);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    min-height: 50px;
    padding: 10px;
    text-align: left;
}

.picker-row strong,
.picker-row em {
    display: block;
}

.picker-row em {
    color: var(--muted);
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    margin-top: 2px;
    text-transform: uppercase;
}

.picker-row b {
    background: var(--black);
    border-radius: 6px;
    color: #fff;
    font-size: 12px;
    padding: 8px 10px;
}

.filters {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

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

.photo-form {
    align-items: end;
    display: grid;
    gap: 14px;
    grid-template-columns: 150px minmax(180px, 1fr) minmax(180px, 1fr) auto;
}

.work-upload {
    grid-template-columns: minmax(220px, 1.2fr) 150px minmax(180px, 1fr) minmax(220px, 1fr) auto;
}

.work-filters {
    align-items: end;
    grid-template-columns: minmax(220px, 1fr) 170px 170px auto auto;
    margin-bottom: 0;
}

.upload-section {
    border-top: 1px solid #e6e6e6;
    margin-top: 24px;
    padding-top: 22px;
}

.photo-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    margin-top: 16px;
}

.photo-card {
    background: #fff;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    margin: 0;
    overflow: hidden;
}

.photo-card img {
    aspect-ratio: 4 / 3;
    background: #111;
    display: block;
    object-fit: cover;
    width: 100%;
}

.photo-card figcaption {
    display: grid;
    gap: 3px;
    padding: 10px 10px 0;
}

.photo-card figcaption strong {
    font-size: 13px;
    overflow-wrap: anywhere;
}

.photo-card figcaption span {
    color: var(--muted);
    font-size: 12px;
}

.photo-card form {
    padding: 10px;
}

.photo-card button {
    background: #f1f1f1;
    color: var(--red);
    font-size: 13px;
    min-height: 34px;
    padding: 8px 10px;
    width: 100%;
}

.count-badge {
    background: var(--black);
    border-radius: 999px;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    padding: 7px 10px;
}

.history-hero {
    align-items: center;
    display: flex;
    justify-content: space-between;
}

.history-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.history-stats span {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 750;
    min-width: 82px;
    padding: 12px 14px;
    text-align: center;
}

.history-stats strong {
    color: var(--black);
    display: block;
    font-size: 28px;
    font-weight: 850;
    line-height: 1;
    margin-bottom: 4px;
}

.history-filters {
    align-items: end;
    grid-template-columns: minmax(280px, 1fr) 170px 170px auto auto;
    margin-bottom: 0;
}

.history-tree {
    display: grid;
    gap: 20px;
}

.model-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.model-folder {
    background: #f8f8f8;
    border: 1px solid #e3e3e3;
    border-radius: 8px;
    padding: 14px;
}

.folder-title {
    align-items: center;
    border-bottom: 1px solid #dddddd;
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
}

.folder-icon {
    align-items: center;
    background: var(--black);
    border-radius: 6px;
    color: #fff;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.folder-icon svg {
    fill: none;
    height: 18px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
    width: 18px;
}

.folder-title strong,
.folder-title small {
    display: block;
}

.folder-title small,
.client-folder-card small,
.client-folder-card span {
    color: var(--muted);
    font-size: 12px;
}

.client-folder-list {
    display: grid;
    gap: 10px;
}

.client-folder-card {
    align-items: center;
    background: #fff;
    border: 1px solid #e4e4e4;
    border-left: 4px solid var(--red);
    border-radius: 8px;
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px;
}

.client-folder-card strong,
.client-folder-card span,
.client-folder-card small {
    display: block;
}

.client-folder-card .button {
    flex: 0 0 auto;
    min-height: 36px;
}

.print-toolbar {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 0 auto 18px;
    max-width: 210mm;
}

.sheet {
    background: #fff;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.18);
    margin: 0 auto;
    min-height: 297mm;
    padding: 22mm 20mm 18mm;
    width: 210mm;
}

.sheet-single {
    height: 297mm;
    overflow: hidden;
    padding: 16mm 18mm 12mm;
}

.sheet-header {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    margin-bottom: 20mm;
}

.sheet-single .sheet-header {
    margin-bottom: 12mm;
}

.sheet-header img {
    height: 32mm;
    object-fit: contain;
    object-position: left center;
    width: 72mm;
}

.sheet-single .sheet-header img {
    height: 27mm;
    width: 64mm;
}

.sheet-header h1 {
    font-size: 28px;
    font-style: italic;
    text-transform: uppercase;
}

.sheet-single .sheet-header h1 {
    font-size: 26px;
}

.sheet-header p {
    color: var(--muted);
    font-size: 12px;
    margin: 6px 0 0;
    text-align: right;
}

.sheet-meta {
    display: grid;
    gap: 12mm;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 18mm;
}

.sheet-single .sheet-meta {
    display: block;
    margin: 0 auto 13mm;
    max-width: 94mm;
}

.sheet-meta span {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.sheet-meta strong {
    border-bottom: 2px solid #222;
    display: block;
    font-size: 20px;
    min-height: 28px;
    padding-top: 5px;
}

.sheet-single .sheet-meta strong {
    font-size: 21px;
    min-height: 26px;
    text-align: center;
}

.sheet-sections {
    display: grid;
    gap: 13mm;
}

.sheet-single .sheet-sections {
    gap: 8mm;
}

.sheet-category h2,
.sheet-notes h2 {
    font-size: 16px;
    margin-bottom: 6mm;
    text-align: center;
    text-transform: uppercase;
}

.sheet-single .sheet-category h2 {
    font-size: 15px;
    margin-bottom: 3.5mm;
}

.print-grid {
    column-gap: 18mm;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    row-gap: 5mm;
}

.sheet-single .print-grid {
    column-gap: 16mm;
    row-gap: 3.4mm;
}

.print-line {
    align-items: end;
    display: grid;
    gap: 5px;
    grid-template-columns: 22px minmax(0, 1fr);
}

.sheet-single .print-line {
    grid-template-columns: 20px minmax(0, 1fr);
}

.number {
    font-size: 13px;
    font-weight: 800;
}

.line-content {
    border-bottom: 1.7px solid #222;
    min-height: 22px;
    overflow-wrap: anywhere;
    padding: 0 4px 3px;
}

.sheet-single .line-content {
    min-height: 18px;
    padding-bottom: 2px;
}

.line-content em {
    color: var(--red);
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    margin-right: 5px;
    text-transform: uppercase;
}

.sheet-single .line-content em {
    font-size: 9px;
}

.sheet-notes {
    margin-top: 13mm;
}

.sheet-notes p {
    border: 1px solid #222;
    min-height: 22mm;
    padding: 8px;
}

@media (max-width: 1050px) {
    .layout,
    .settings-shell {
        grid-template-columns: 1fr;
    }

    .settings-sidebar-card {
        position: static;
    }

    .settings-nav {
        grid-template-columns: repeat(5, minmax(130px, 1fr));
        overflow-x: auto;
    }
}

@media (max-width: 720px) {
    .topbar {
        align-items: center;
        display: grid;
        gap: 12px;
        grid-template-columns: 1fr auto;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .top-actions {
        display: none;
        grid-column: 1 / -1;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .topbar.menu-open .top-actions {
        display: grid;
    }

    .top-actions .button {
        justify-content: flex-start;
        width: 100%;
    }

    .fields-grid,
    .categories,
    .preset-form,
    .settings-grid,
    .photo-form,
    .work-upload,
    .work-filters,
    .history-filters,
    .sheet-meta,
    .print-grid {
        grid-template-columns: 1fr;
    }

    .history-hero,
    .dashboard-hero,
    .settings-hero,
    .client-folder-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .settings-shell {
        padding: 18px 12px;
    }

    .settings-sidebar-card {
        padding: 16px;
    }

    .settings-nav {
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .dashboard-grid,
    .module-grid,
    .user-management-grid,
    .user-form-fields,
    .user-card-top,
    .user-form,
    .user-row,
    .password-form,
    .assigned-row,
    .dashboard-task {
        grid-template-columns: 1fr;
    }

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

    .item-row {
        grid-template-columns: 1fr 36px 36px;
    }

    .category[data-category='altele'] .item-row {
        grid-template-columns: 1fr 36px 36px;
    }

    .item-row select {
        grid-column: 1 / -1;
    }

    .print-body {
        padding: 0;
    }

    .print-toolbar {
        background: var(--black);
        margin: 0;
        max-width: none;
        padding: 12px;
        position: sticky;
        top: 0;
        z-index: 2;
    }

    .sheet {
        box-shadow: none;
        min-height: auto;
        padding: 18px;
        width: 100%;
    }

    .sheet-header {
        gap: 18px;
        margin-bottom: 30px;
    }

    .sheet-header img {
        height: auto;
        width: 150px;
    }
}

@media print {
    @page {
        margin: 0;
        size: A4;
    }

    body {
        background: #fff;
    }

    .print-toolbar {
        display: none;
    }

    .sheet {
        box-shadow: none;
        min-height: 297mm;
        width: 210mm;
    }

    .sheet-single {
        height: 297mm;
        overflow: hidden;
    }
}
