* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        "Noto Sans JP",
        sans-serif;

    background: #f5f6f8;
    color: #222;
}


/* ==============================
   Header
============================== */

header {
    background: #1f2329;
    color: #fff;

    padding: 18px 28px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: 700;
}

.user-area {
    font-size: 14px;

    display: flex;
    align-items: center;
    gap: 18px;
}

.logout-link {
    color: #fff;

    text-decoration: none;

    padding: 7px 12px;

    border: 1px solid
        rgba(255, 255, 255, 0.35);

    border-radius: 6px;
}

.logout-link:hover {
    background:
        rgba(255, 255, 255, 0.12);
}


/* ==============================
   Main
============================== */

main {
    max-width: 1200px;

    margin: 0 auto;
    padding: 30px 20px;
}


/* ==============================
   Cards
============================== */

.card,
.welcome {
    background: #fff;

    border-radius: 12px;

    padding: 28px;

    box-shadow:
        0 3px 15px
        rgba(0, 0, 0, 0.06);
}


/* ==============================
   Status
============================== */

.status {
    margin-top: 25px;

    padding: 15px;

    background: #eef8f0;

    border-radius: 8px;

    color: #236b35;
}


/* ==============================
   Common form
============================== */

label {
    display: block;

    font-size: 14px;
    font-weight: 600;

    margin-bottom: 7px;
}

input,
select,
textarea {
    width: 100%;

    padding: 12px 14px;

    font-size: 16px;

    border: 1px solid #ccc;
    border-radius: 8px;

    background: #fff;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #555;
}


/* ==============================
   Buttons
============================== */

button,
.btn {
    display: inline-block;

    border: 0;
    border-radius: 8px;

    padding: 12px 18px;

    background: #222;
    color: #fff;

    font-size: 15px;
    font-weight: 600;

    text-decoration: none;
    cursor: pointer;
}

button:hover,
.btn:hover {
    background: #000;
}


/* ==============================
   PIN Lock
============================== */

.lock-screen {
    position: fixed;

    inset: 0;

    background:
        rgba(20, 22, 26, 0.96);

    z-index: 9999;

    display: none;

    align-items: center;
    justify-content: center;

    padding: 20px;
}

.lock-screen.active {
    display: flex;
}

.lock-box {
    width: 100%;
    max-width: 380px;

    background: #fff;

    border-radius: 16px;

    padding: 35px;

    text-align: center;
}

.lock-icon {
    width: 72px;
    height: 72px;

    margin: 0 auto 18px;

    border-radius: 50%;

    background: #222;
    color: #fff;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 30px;
    font-weight: 700;
}

.lock-name {
    font-size: 20px;
    font-weight: 700;

    margin-bottom: 5px;
}

.lock-message {
    color: #777;

    margin-bottom: 24px;
}

.pin-input {
    width: 100%;

    padding: 14px;

    font-size: 22px;
    text-align: center;

    letter-spacing: 8px;

    border: 1px solid #ccc;
    border-radius: 8px;

    margin-bottom: 15px;
}

.unlock-button {
    width: 100%;
}

.lock-logout {
    display: block;

    margin-top: 18px;

    color: #666;

    font-size: 14px;

    text-decoration: none;
}

.lock-logout:hover {
    text-decoration: underline;
}

.pin-error {
    display: none;

    margin-top: 14px;

    color: #b00020;

    font-size: 14px;
}


/* ==============================
   Mobile
============================== */

@media (max-width: 700px) {

    header {
        padding: 14px 16px;
    }

    .logo {
        font-size: 20px;
    }

    .user-area {
        gap: 10px;
    }

    main {
        padding: 20px 12px;
    }

    .card,
    .welcome {
        padding: 20px;
    }
}

/* ==============================
   Page title
============================== */

.page-title {
    margin-bottom: 24px;
}

.page-title h1 {
    margin: 0 0 5px;

    font-size: 28px;
}

.page-title p {
    margin: 0;

    color: #777;
}


/* ==============================
   Dashboard
============================== */

.dashboard-stats {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 18px;

    margin-bottom: 25px;
}

.stat-card {

    background: #fff;

    border-radius: 12px;

    padding: 22px;

    box-shadow:
        0 3px 15px
        rgba(0, 0, 0, 0.06);

    border-left:
        5px solid #555;
}

.stat-danger {
    border-left-color: #c62828;
}

.stat-warning {
    border-left-color: #e3a008;
}

.stat-label {

    font-size: 14px;
    color: #666;

    margin-bottom: 8px;
}

.stat-number {

    display: inline-block;

    font-size: 36px;
    font-weight: 700;

    line-height: 1;
}

.stat-unit {

    display: inline-block;

    margin-left: 5px;

    font-size: 14px;
    color: #777;
}


/* ==============================
   Section
============================== */

.dashboard-section {
    margin-top: 10px;
}

.section-header {

    display: flex;
    justify-content: space-between;
    align-items: flex-start;

    margin-bottom: 20px;
}

.section-header h2 {

    margin: 0 0 4px;

    font-size: 20px;
}

.section-header p {

    margin: 0;

    font-size: 14px;
    color: #777;
}


/* ==============================
   Table
============================== */

.table-wrap {

    width: 100%;
    overflow-x: auto;
}

.data-table {

    width: 100%;

    border-collapse: collapse;
}

.data-table th {

    padding: 12px 10px;

    text-align: left;

    font-size: 13px;
    color: #666;

    border-bottom:
        2px solid #eee;

    white-space: nowrap;
}

.data-table td {

    padding: 14px 10px;

    border-bottom:
        1px solid #eee;

    vertical-align: middle;
}

.data-table tbody tr:hover {

    background: #fafafa;
}

.sub-text {

    margin-top: 4px;

    font-size: 12px;
    color: #888;
}


/* ==============================
   Status badge
============================== */

.status-badge {

    display: inline-block;

    padding: 5px 9px;

    border-radius: 20px;

    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;

    background: #eee;
}

.status-new {
    background: #e8eef9;
    color: #34558b;
}

.status-active {
    background: #fff1d6;
    color: #8a5b00;
}

.status-watching {
    background: #e8f2ff;
    color: #245c9e;
}

.status-resolved {
    background: #e5f4e8;
    color: #33733e;
}

.status-archived {
    background: #eeeeee;
    color: #777;
}


/* ==============================
   Date alert
============================== */

.date-overdue {

    color: #c62828;

    font-weight: 700;
}

.date-today {

    color: #a66b00;

    font-weight: 700;
}


/* ==============================
   Empty
============================== */

.empty-message {

    padding: 35px 15px;

    text-align: center;

    color: #888;
}


/* ==============================
   Dashboard mobile
============================== */

@media (max-width: 850px) {

    .dashboard-stats {
        grid-template-columns:
            repeat(2, 1fr);
    }
}

@media (max-width: 500px) {

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

        gap: 10px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-number {
        font-size: 30px;
    }

    .page-title h1 {
        font-size: 24px;
    }
}
/* ==============================
   Header navigation
============================== */

.header-left {
    display: flex;
    align-items: center;
    gap: 35px;
}

.logo {
    color: #fff;
    text-decoration: none;
}

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

.main-nav a {
    color: #bbb;

    text-decoration: none;

    padding: 8px 11px;

    border-radius: 6px;

    font-size: 14px;
}

.main-nav a:hover,
.main-nav a.active {
    color: #fff;

    background:
        rgba(255, 255, 255, 0.10);
}


/* ==============================
   Page title row
============================== */

.page-title-row {
    display: flex;

    justify-content: space-between;
    align-items: flex-end;

    gap: 20px;
}


/* ==============================
   Search
============================== */

.search-card {
    padding: 20px 24px;

    margin-bottom: 22px;
}

.driver-search-form {

    display: grid;

    grid-template-columns:
        minmax(250px, 2fr)
        minmax(180px, 1fr)
        auto;

    gap: 18px;

    align-items: end;
}

.search-field label {
    margin-bottom: 6px;
}

.search-buttons {

    display: flex;
    gap: 8px;
}

.btn-secondary {

    background: #e7e8ea;
    color: #333;
}

.btn-secondary:hover {

    background: #d7d9dc;
}


/* ==============================
   Driver list
============================== */

.driver-list-card {
    padding: 24px 28px;
}

.clickable-row {
    cursor: pointer;
}

.clickable-row:hover {
    background: #f5f7fa !important;
}

.employment-badge {

    display: inline-block;

    padding: 5px 9px;

    border-radius: 20px;

    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;
}

.employment-active {
    background: #e5f4e8;
    color: #33733e;
}

.employment-leave {
    background: #fff1d6;
    color: #8a5b00;
}

.employment-pre {
    background: #e8eef9;
    color: #34558b;
}

.employment-retired {
    background: #eeeeee;
    color: #777;
}

.case-alert {
    color: #c62828;
}


/* ==============================
   Mobile navigation / drivers
============================== */

@media (max-width: 700px) {

    header {
        align-items: flex-start;
    }

    .header-left {
        display: block;
    }

    .main-nav {
        margin-top: 8px;
    }

    .main-nav a {
        padding-left: 0;
        padding-right: 14px;
    }

    .page-title-row {
        align-items: flex-start;
    }

    .driver-search-form {
        grid-template-columns: 1fr;
    }

    .search-buttons {
        width: 100%;
    }

    .search-buttons button,
    .search-buttons .btn {
        flex: 1;
        text-align: center;
    }
}
/* ==============================
   Form card
============================== */

.form-card {
    max-width: 700px;
}

.form-group {
    margin-bottom: 22px;
}

.form-error {
    margin-bottom: 22px;

    padding: 13px 15px;

    background: #fff1f1;
    color: #b00020;

    border: 1px solid #f0c4c4;
    border-radius: 8px;
}

.form-actions {
    margin-top: 30px;

    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
/* ==============================
   Driver detail
============================== */

.driver-page-header {

    display: flex;

    justify-content: space-between;
    align-items: flex-end;

    gap: 20px;

    margin-bottom: 24px;
}

.driver-page-header h1 {

    margin:
        8px 0
        5px;

    font-size: 30px;
}

.back-link {

    color: #666;

    text-decoration: none;

    font-size: 14px;
}

.back-link:hover {
    text-decoration: underline;
}

.driver-heading-meta {

    display: flex;
    gap: 14px;

    color: #666;
}

.driver-layout {

    display: grid;

    grid-template-columns:
        minmax(260px, 1fr)
        minmax(0, 2.3fr);

    gap: 22px;

    align-items: start;
}


/* 左側 */

.driver-side {

    display: grid;
    gap: 20px;
}

.driver-profile-card h2,
.recent-driving-card h2 {

    margin:
        0 0
        20px;

    font-size: 18px;
}

.driver-info {

    margin: 0;
}

.driver-info div {

    padding:
        12px 0;

    border-bottom:
        1px solid #eee;
}

.driver-info div:first-child {
    padding-top: 0;
}

.driver-info div:last-child {

    border-bottom: 0;
    padding-bottom: 0;
}

.driver-info dt {

    margin-bottom: 4px;

    font-size: 12px;
    color: #888;
}

.driver-info dd {

    margin: 0;

    font-weight: 600;
}

.muted-text {

    color: #777;
    font-size: 14px;

    line-height: 1.7;
}

.empty-small {

    margin-top: 15px;

    padding: 15px;

    text-align: center;

    background: #f5f6f8;

    border-radius: 8px;

    color: #999;

    font-size: 13px;
}


/* 案件 */

.case-section-header {

    margin-bottom: 12px;
}

.case-section-header h2 {

    display: inline-block;

    margin: 0 8px 0 0;

    font-size: 21px;
}

.case-section-header p {

    display: inline-block;

    margin: 0;

    color: #888;
}

.case-card-list {

    display: grid;

    gap: 13px;
}

.driver-case-card {

    display: block;

    padding: 21px 23px;

    background: #fff;

    border-radius: 12px;

    border-left:
        5px solid #555;

    box-shadow:
        0 3px 15px
        rgba(0, 0, 0, 0.06);

    color: #222;

    text-decoration: none;

    transition:
        transform 0.1s,
        box-shadow 0.1s;
}

.driver-case-card:hover {

    transform:
        translateY(-1px);

    box-shadow:
        0 5px 18px
        rgba(0, 0, 0, 0.10);
}

.driver-case-card.case-overdue {
    border-left-color: #c62828;
}

.driver-case-card.case-today {
    border-left-color: #e3a008;
}

.driver-case-card.case-closed {

    opacity: 0.65;

    border-left-color: #aaa;
}

.case-card-top {

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;
}

.case-category {

    margin-left: 8px;

    color: #666;

    font-size: 13px;
}

.case-next-date {

    color: #666;

    font-size: 13px;

    white-space: nowrap;
}

.driver-case-card h3 {

    margin:
        13px 0
        8px;

    font-size: 19px;
}

.case-summary {

    margin:
        0 0
        15px;

    color: #555;

    font-size: 14px;

    line-height: 1.65;
}

.case-card-bottom {

    display: flex;
    flex-wrap: wrap;

    gap: 18px;

    padding-top: 12px;

    border-top:
        1px solid #eee;

    color: #888;

    font-size: 12px;
}

.driver-empty-case {

    text-align: center;

    padding: 50px 30px;
}

.empty-case-title {

    font-size: 20px;
    font-weight: 700;

    margin-bottom: 8px;
}

.driver-empty-case p {

    color: #777;

    margin-bottom: 22px;
}


/* Mobile */

@media (max-width: 800px) {

    .driver-layout {
        grid-template-columns: 1fr;
    }

    .driver-main {
        order: 1;
    }

    .driver-side {
        order: 2;
    }

    .driver-page-header {
        align-items: flex-start;
    }
}

@media (max-width: 500px) {

    .driver-page-header {

        display: block;
    }

    .driver-page-header .btn {

        display: block;

        margin-top: 18px;

        text-align: center;
    }

    .case-card-top {

        display: block;
    }

    .case-next-date {

        margin-top: 10px;
    }
}
/* ==============================
   Case form
============================== */

.case-form-card {
    max-width: 900px;
}

.form-grid {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 0 20px;
}

.case-form-card textarea {

    resize: vertical;

    min-height: 140px;
}


/* Mobile */

@media (max-width: 650px) {

    .form-grid {
        grid-template-columns: 1fr;
    }
}
/* ==============================
   Case detail
============================== */

.case-detail-header {

    display: flex;

    justify-content: space-between;
    align-items: flex-end;

    gap: 20px;

    margin-bottom: 24px;
}

.case-detail-header h1 {

    margin:
        10px 0
        6px;

    font-size: 30px;
}

.case-detail-badges {

    margin-top: 14px;
}

.case-category-badge {

    display: inline-block;

    margin-left: 7px;

    padding: 5px 9px;

    border-radius: 20px;

    background: #eee;

    color: #555;

    font-size: 12px;
    font-weight: 600;
}

.case-driver-line {

    color: #666;

    font-size: 14px;
}


/* Layout */

.case-detail-layout {

    display: grid;

    grid-template-columns:
        minmax(250px, 0.9fr)
        minmax(0, 2.1fr);

    gap: 22px;

    align-items: start;
}

.case-detail-side {

    display: grid;
    gap: 20px;
}

.case-detail-main {

    display: grid;
    gap: 20px;
}

.case-card-heading {

    margin:
        0 0
        20px;

    font-size: 18px;
}


/* Case info */

.case-info-list {

    margin: 0;
}

.case-info-list div {

    padding:
        11px 0;

    border-bottom:
        1px solid #eee;
}

.case-info-list div:first-child {
    padding-top: 0;
}

.case-info-list div:last-child {

    border-bottom: 0;
    padding-bottom: 0;
}

.case-info-list dt {

    margin-bottom: 4px;

    color: #888;

    font-size: 12px;
}

.case-info-list dd {

    margin: 0;

    font-weight: 600;
}

.case-detail-overdue {

    color: #c62828;

    font-weight: 700 !important;
}

.case-detail-today {

    color: #a66b00;

    font-weight: 700 !important;
}


/* Summary */

.case-detail-summary {

    font-size: 15px;

    line-height: 1.8;

    white-space: normal;
}


/* History heading */

.case-history-header {

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;
}

.case-history-header h2 {

    display: inline-block;

    margin: 0 8px 0 0;

    font-size: 21px;
}

.case-history-header p {

    display: inline-block;

    margin: 0;

    color: #888;
}

.btn-small {

    padding: 9px 13px;

    font-size: 13px;
}


/* Timeline */

.case-timeline {

    position: relative;

    display: grid;

    gap: 14px;

    padding-left: 28px;
}

.case-timeline::before {

    content: "";

    position: absolute;

    left: 8px;
    top: 10px;
    bottom: 10px;

    width: 2px;

    background: #ddd;
}

.case-timeline-item {

    position: relative;
}

.timeline-dot {

    position: absolute;

    left: -25px;
    top: 24px;

    width: 12px;
    height: 12px;

    border-radius: 50%;

    background: #333;

    border: 3px solid #f5f6f8;
}

.timeline-card {

    padding: 20px 22px;
}

.timeline-top {

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;

    margin-bottom: 14px;
}

.timeline-type {

    font-size: 16px;
}

.timeline-date {

    margin-left: 10px;

    color: #888;

    font-size: 12px;
}

.timeline-user {

    color: #888;

    font-size: 12px;

    white-space: nowrap;
}

.timeline-content {

    font-size: 14px;

    line-height: 1.75;
}

.timeline-response {

    margin-top: 16px;

    padding: 13px 15px;

    background: #f6f7f8;

    border-radius: 8px;

    font-size: 14px;

    line-height: 1.7;
}

.timeline-label {

    margin-bottom: 5px;

    color: #777;

    font-size: 12px;
    font-weight: 600;
}

.timeline-next {

    margin-top: 14px;

    padding-top: 12px;

    border-top:
        1px solid #eee;

    color: #666;

    font-size: 13px;
}

.case-history-empty {

    padding: 45px 30px;

    text-align: center;
}

.case-history-empty strong {

    display: block;

    margin-bottom: 7px;

    font-size: 18px;
}

.case-history-empty p {

    margin:
        0 0
        20px;

    color: #777;

    line-height: 1.7;
}


/* Files */

.case-file-list {

    display: grid;
    gap: 10px;
}

.case-file-item {

    padding:
        10px 12px;

    background: #f6f7f8;

    border-radius: 8px;
}

.case-file-name {

    font-size: 13px;
    font-weight: 600;

    word-break: break-all;
}

.case-file-meta {

    margin-top: 3px;

    color: #888;

    font-size: 11px;
}

.case-file-note {

    margin:
        15px 0
        0;

    color: #999;

    font-size: 11px;
}


/* Mobile */

@media (max-width: 800px) {

    .case-detail-layout {

        grid-template-columns: 1fr;
    }

    .case-detail-main {
        order: 1;
    }

    .case-detail-side {
        order: 2;
    }

    .case-detail-header {

        align-items: flex-start;
    }
}

@media (max-width: 500px) {

    .case-detail-header {

        display: block;
    }

    .case-detail-header .btn {

        display: block;

        margin-top: 18px;

        text-align: center;
    }

    .timeline-top {

        display: block;
    }

    .timeline-user {

        display: block;

        margin-top: 7px;
    }
}
/* ==============================
   Action form
============================== */

.action-form-card {

    max-width: 900px;
}

.action-form-card textarea {

    resize: vertical;
}

.action-followup-box {

    margin-top: 28px;

    padding: 20px;

    background: #f6f7f8;

    border-radius: 10px;
}

.action-followup-title {

    margin-bottom: 17px;

    font-size: 16px;
    font-weight: 700;
}
.case-header-actions {

    display: flex;
    gap: 10px;

    align-items: center;
}


@media (max-width: 500px) {

    .case-header-actions {

        display: grid;

        gap: 8px;

        margin-top: 18px;
    }

    .case-header-actions .btn {

        text-align: center;

        margin-top: 0;
    }
}
/* ==============================
   Timeline actions
============================== */

.timeline-actions {

    display: flex;

    align-items: center;

    gap: 12px;
}

.timeline-edit-link {

    color: #555;

    font-size: 12px;

    text-decoration: none;

    padding: 4px 8px;

    border: 1px solid #ddd;

    border-radius: 5px;
}

.timeline-edit-link:hover {

    background: #f1f2f3;
}


@media (max-width: 500px) {

    .timeline-actions {

        margin-top: 8px;
    }
}
/* ==============================
   File actions
============================== */

.case-file-buttons {

    display: flex;

    align-items: center;

    gap: 7px;

    margin-top: 8px;
}

.file-action-link,
.file-delete-button {

    display: inline-block;

    padding: 4px 8px;

    border: 1px solid #ddd;

    border-radius: 5px;

    background: #fff;

    color: #555;

    font-size: 11px;

    text-decoration: none;

    cursor: pointer;
}

.file-action-link:hover {

    background: #eef1f3;
}

.file-delete-form {
    margin: 0;
}

.file-delete-button {

    color: #b3261e;

    border-color: #e6c8c5;
}

.file-delete-button:hover {

    background: #fff1f1;
}
/* ==============================
   Driver header actions
============================== */

.driver-header-actions {

    display: flex;

    align-items: center;

    gap: 10px;
}


@media (max-width: 500px) {

    .driver-header-actions {

        display: grid;

        gap: 8px;

        margin-top: 18px;
    }

    .driver-header-actions .btn {

        text-align: center;

        margin-top: 0;
    }
}
/* ==============================
   History search
============================== */

.history-search-card {

    margin-bottom: 22px;

    padding: 22px 24px;
}

.history-search-form {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 14px 18px;

    align-items: end;
}

.history-search-form .form-group {

    margin-bottom: 0;
}

.history-keyword {

    grid-column:
        span 2;
}

.history-search-actions {

    display: flex;

    gap: 8px;

    align-items: center;
}

.history-result-card {

    padding: 24px 28px;
}

.history-table {

    min-width: 1150px;
}

.history-date {

    white-space: nowrap;

    font-size: 13px;
}

.history-content {

    min-width: 260px;

    line-height: 1.55;

    font-size: 13px;
}

.history-driver-link,
.history-case-link {

    color: #222;

    text-decoration: none;
}

.history-driver-link:hover,
.history-case-link:hover {

    text-decoration: underline;
}


/* Mobile */

@media (max-width: 900px) {

    .history-search-form {

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

    .history-keyword {

        grid-column:
            span 2;
    }
}


@media (max-width: 550px) {

    .history-search-form {

        grid-template-columns:
            1fr;
    }

    .history-keyword {

        grid-column:
            auto;
    }

    .history-search-actions {

        width: 100%;
    }

    .history-search-actions button,
    .history-search-actions .btn {

        flex: 1;

        text-align: center;
    }
}
/* ==============================
   Settings
============================== */

.settings-grid {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}

.settings-card {

    color: #222;

    text-decoration: none;
}

.settings-card:hover {

    transform:
        translateY(-1px);

    box-shadow:
        0 5px 18px
        rgba(0, 0, 0, 0.10);
}

.settings-card h2 {

    margin:
        0 0
        8px;

    font-size: 19px;
}

.settings-card p {

    margin: 0;

    color: #777;

    line-height: 1.6;
}


/* Category management */

.category-add-card {

    margin-bottom: 22px;
}

.category-add-card h2,
.category-list-card h2 {

    margin-top: 0;
}

.category-add-form {

    display: grid;

    grid-template-columns:
        minmax(250px, 2fr)
        120px
        auto;

    gap: 15px;

    align-items: end;
}

.category-list {

    display: grid;

    gap: 12px;
}

.category-row {

    display: grid;

    grid-template-columns:
        minmax(250px, 2fr)
        120px
        130px
        auto;

    gap: 15px;

    align-items: end;

    padding-bottom: 12px;

    border-bottom:
        1px solid #eee;
}

.category-active {

    display: flex;

    align-items: center;

    gap: 7px;

    height: 43px;

    margin: 0;
}

.category-active input {

    width: auto;
}


@media (max-width: 750px) {

    .settings-grid {

        grid-template-columns:
            1fr;
    }

    .category-add-form,
    .category-row {

        grid-template-columns:
            1fr;
    }
}

/* ==============================
   User management
============================== */

.success-message {

    margin-bottom: 20px;

    padding: 13px 15px;

    background: #eef8f0;

    border: 1px solid #cce6d1;

    border-radius: 8px;

    color: #236b35;
}


.user-add-card {

    margin-bottom: 22px;
}

.user-add-card h2 {

    margin-top: 0;
}


.user-add-form {

    display: grid;

    grid-template-columns:
        1.2fr
        1.2fr
        0.8fr
        1.4fr
        0.8fr
        auto;

    gap: 14px;

    align-items: end;
}


.user-list {

    display: grid;

    gap: 16px;
}


.user-edit-card {

    padding: 22px 24px;
}


.user-edit-header {

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    margin-bottom: 18px;
}


.user-edit-header strong {

    font-size: 18px;
}


.current-user-badge {

    margin-left: 7px;

    padding: 3px 7px;

    border-radius: 10px;

    background: #e8eef9;

    color: #34558b;

    font-size: 11px;
    font-weight: 600;
}


.user-state {

    padding: 5px 9px;

    border-radius: 20px;

    font-size: 12px;
    font-weight: 600;
}


.user-state-active {

    background: #e5f4e8;
    color: #33733e;
}


.user-state-disabled {

    background: #eee;
    color: #777;
}


.user-edit-grid {

    display: grid;

    grid-template-columns:
        repeat(5, minmax(0, 1fr));

    gap: 14px;
}


.user-edit-bottom {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 18px;

    margin-top: 18px;

    padding-top: 16px;

    border-top: 1px solid #eee;
}


.user-meta {

    margin-right: auto;

    color: #888;

    font-size: 12px;
}


.user-active-check {

    display: flex;

    align-items: center;

    gap: 7px;

    margin: 0;

    white-space: nowrap;
}


.user-active-check input {

    width: auto;
}


@media (max-width: 1050px) {

    .user-add-form {

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

    .user-edit-grid {

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


@media (max-width: 550px) {

    .user-add-form,
    .user-edit-grid {

        grid-template-columns: 1fr;
    }

    .user-edit-bottom {

        align-items: stretch;

        flex-direction: column;
    }

    .user-meta {

        margin-right: 0;
    }

    .user-edit-bottom button {

        width: 100%;
    }
}
