:root {
    --background: #f4f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --border: #e2e8f0;
    --text: #0f172a;
    --muted: #64748b;
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --positive: #15803d;
    --negative: #dc2626;
    --shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--background);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

.auth-page {
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(
            circle at top left,
            rgba(37, 99, 235, 0.16),
            transparent 32%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(14, 165, 233, 0.12),
            transparent 30%
        ),
        var(--background);
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 40px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow);
}

.brand-mark {
    width: 52px;
    height: 52px;
    display: grid;
    place-items: center;
    margin-bottom: 24px;
    border-radius: 15px;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
}

.brand-mark-small {
    width: 36px;
    height: 36px;
    margin: 0;
    border-radius: 11px;
    font-size: 17px;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

h1,
h2,
p {
    margin-top: 0;
}

.auth-card h1 {
    margin-bottom: 10px;
    font-size: 30px;
}

.muted {
    margin-bottom: 28px;
    color: var(--muted);
    line-height: 1.6;
}

.form-stack {
    display: grid;
    gap: 18px;
}

.form-stack label {
    display: grid;
    gap: 8px;
}

.form-stack label span {
    font-size: 14px;
    font-weight: 700;
}

input {
    width: 100%;
    min-height: 48px;
    padding: 11px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    outline: none;
    background: #ffffff;
    color: var(--text);
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease;
}

input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.button {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    font-weight: 800;
}

.button-primary {
    background: var(--primary);
    color: #ffffff;
}

.button-primary:hover {
    background: var(--primary-hover);
}

.button-secondary {
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text);
}

.button-small {
    min-height: 38px;
    padding: 8px 13px;
    font-size: 13px;
}

.alert {
    margin: 20px 0;
    padding: 14px 16px;
    border-radius: 11px;
    line-height: 1.5;
}

.alert-error {
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.alert-success {
    border: 1px solid #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.topbar {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 0 32px;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.95);
}

.brand,
.topbar-user {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    font-size: 18px;
    font-weight: 850;
}

.topbar-user {
    color: var(--muted);
    font-size: 14px;
}

.dashboard {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 44px 0;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    margin-bottom: 28px;
}

.page-heading h1 {
    margin-bottom: 0;
    font-size: clamp(28px, 4vw, 40px);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.summary-card,
.panel {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.summary-card {
    display: grid;
    gap: 10px;
    padding: 22px;
}

.summary-card span {
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
}

.summary-card strong {
    font-size: 25px;
}

.value-positive {
    color: var(--positive);
}

.value-negative {
    color: var(--negative);
}

.panel {
    padding: 28px;
}

.empty-state {
    display: grid;
    justify-items: center;
    padding: 70px 24px;
    text-align: center;
}

.empty-state p {
    max-width: 520px;
    margin-bottom: 0;
    color: var(--muted);
    line-height: 1.7;
}

.empty-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border-radius: 16px;
    background: #dbeafe;
    color: var(--primary);
    font-size: 30px;
}

@media (max-width: 900px) {
    .summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .auth-card {
        padding: 28px 22px;
    }

    .topbar {
        padding: 14px 18px;
    }

    .topbar-user > span {
        display: none;
    }

    .dashboard {
        width: min(100% - 28px, 1180px);
        padding: 30px 0;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }
}

.topbar {
    padding: 0;
}

.topbar-inner {
    width: min(1180px, calc(100% - 40px));
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 32px;
    margin: 0 auto;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a {
    padding: 9px 13px;
    border-radius: 9px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 750;
}

.main-nav a:hover {
    background: var(--surface-soft);
    color: var(--text);
}

.main-nav a.active {
    background: #dbeafe;
    color: var(--primary);
}

.topbar-user {
    margin-left: auto;
}

.page-heading {
    align-items: flex-start;
    gap: 24px;
}

.page-description {
    max-width: 660px;
    margin: 10px 0 0;
    color: var(--muted);
    line-height: 1.6;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.page-actions form {
    margin: 0;
}

.filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
}

.filter-tabs a {
    padding: 9px 15px;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 14px;
    font-weight: 750;
}

.filter-tabs a.active {
    border-color: var(--primary);
    background: var(--primary);
    color: #ffffff;
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.panel-header h2,
.panel-header h3 {
    margin-bottom: 0;
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.data-table th,
.data-table td {
    padding: 16px 14px;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background: var(--surface-soft);
}

.project-name-link {
    display: block;
    margin-bottom: 4px;
    font-weight: 800;
}

.project-name-link:hover {
    color: var(--primary);
}

.table-secondary {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.table-actions {
    text-align: right !important;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.status-active {
    background: #dbeafe;
    color: #1d4ed8;
}

.status-completed {
    background: #dcfce7;
    color: #166534;
}

.compact-empty-state {
    padding: 45px 20px;
}

.compact-empty-state .button {
    margin-top: 8px;
}

.project-form {
    max-width: 920px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.form-field {
    display: grid;
    gap: 8px;
}

.form-field > span {
    font-size: 14px;
    font-weight: 750;
}

.form-field-wide {
    grid-column: 1 / -1;
}

textarea,
select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    outline: none;
    background: #ffffff;
    color: var(--text);
    font: inherit;
    resize: vertical;
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease;
}

textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.input-with-suffix {
    position: relative;
}

.input-with-suffix input {
    padding-right: 44px;
}

.input-with-suffix > span {
    position: absolute;
    top: 50%;
    right: 15px;
    color: var(--muted);
    font-weight: 700;
    transform: translateY(-50%);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.error-list {
    margin: 10px 0 0;
    padding-left: 20px;
}

.error-list li + li {
    margin-top: 5px;
}

.alert-info {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e40af;
}

.project-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 28px;
}

.project-heading-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.project-heading-line h1 {
    margin-bottom: 0;
    font-size: clamp(28px, 4vw, 40px);
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--muted);
    font-size: 13px;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.project-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.8fr);
    gap: 22px;
}

.record-count {
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
}

.detail-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.detail-list > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.detail-list dt {
    color: var(--muted);
    font-size: 14px;
}

.detail-list dd {
    margin: 0;
    font-weight: 750;
    text-align: right;
}

.notes-box {
    margin-top: 24px;
    padding: 18px;
    border-radius: 12px;
    background: var(--surface-soft);
}

.notes-box h3 {
    margin-bottom: 10px;
    font-size: 15px;
}

.notes-box p {
    margin: 0;
    color: var(--muted);
    line-height: 1.65;
}

.danger-zone {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #fecaca;
}

.danger-zone h3 {
    margin-bottom: 8px;
    color: #991b1b;
}

.danger-zone p {
    margin-bottom: 16px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.button-danger {
    background: #dc2626;
    color: #ffffff;
}

.button-danger:hover {
    background: #b91c1c;
}

.project-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.project-card {
    display: grid;
    gap: 24px;
    padding: 20px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease,
        transform 150ms ease;
}

.project-card:hover {
    border-color: #93c5fd;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.project-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.project-card-header h3 {
    margin-bottom: 5px;
}

.project-card-header p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
}

.project-card-values {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.project-card-values div {
    display: grid;
    gap: 5px;
}

.project-card-values span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.project-card-values strong {
    font-size: 17px;
}

@media (max-width: 900px) {
    .topbar-inner {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 0;
    }

    .main-nav {
        order: 3;
        width: 100%;
    }

    .main-nav a {
        flex: 1;
        text-align: center;
    }

    .project-layout {
        grid-template-columns: 1fr;
    }

    .project-card-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .page-heading,
    .project-title-row {
        display: grid;
    }

    .page-heading > .button {
        width: 100%;
    }

    .page-actions {
        justify-content: stretch;
    }

    .page-actions > *,
    .page-actions form,
    .page-actions button {
        width: 100%;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-field-wide {
        grid-column: auto;
    }

    .form-actions {
        display: grid;
    }

    .project-card-values {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   ProLumi – tumma teema ja punaiset korostusvärit
   ========================================================= */

:root {
    color-scheme: dark;

    --background: #08080a;
    --surface: #111114;
    --surface-soft: #17171c;
    --surface-raised: #1d1d23;

    --border: #2b2b33;
    --border-strong: #3f3f49;

    --text: #f5f5f6;
    --muted: #a1a1aa;

    --primary: #dc2626;
    --primary-hover: #ef4444;
    --primary-dark: #991b1b;
    --primary-soft: rgba(220, 38, 38, 0.14);
    --primary-border: rgba(248, 113, 113, 0.38);

    --positive: #f4f4f5;
    --negative: #f87171;

    --shadow:
        0 22px 65px rgba(0, 0, 0, 0.42);
}

html {
    background: var(--background);
}

body {
    background:
        radial-gradient(
            circle at top left,
            rgba(127, 29, 29, 0.15),
            transparent 30%
        ),
        radial-gradient(
            circle at bottom right,
            rgba(69, 10, 10, 0.2),
            transparent 28%
        ),
        var(--background);

    color: var(--text);
}

.auth-page {
    background:
        radial-gradient(
            circle at 15% 10%,
            rgba(220, 38, 38, 0.17),
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 90%,
            rgba(127, 29, 29, 0.2),
            transparent 32%
        ),
        #08080a;
}

.auth-card {
    border-color: var(--border);
    background:
        linear-gradient(
            145deg,
            rgba(29, 29, 35, 0.98),
            rgba(14, 14, 17, 0.98)
        );
    box-shadow: var(--shadow);
}

.brand-mark {
    background:
        linear-gradient(
            135deg,
            #ef4444,
            #991b1b
        );

    box-shadow:
        0 10px 28px rgba(220, 38, 38, 0.3);
}

.eyebrow {
    color: #f87171;
}

.muted,
.page-description,
.table-secondary,
.record-count {
    color: var(--muted);
}

input,
textarea,
select {
    border-color: var(--border-strong);
    background: #0d0d10;
    color: var(--text);
}

input::placeholder,
textarea::placeholder {
    color: #71717a;
}

input:focus,
textarea:focus,
select:focus {
    border-color: #ef4444;

    box-shadow:
        0 0 0 4px rgba(220, 38, 38, 0.17);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--text);

    -webkit-box-shadow:
        0 0 0 1000px #0d0d10 inset;

    transition:
        background-color 9999s ease-in-out 0s;
}

.button-primary {
    background:
        linear-gradient(
            135deg,
            #dc2626,
            #991b1b
        );

    color: #ffffff;

    box-shadow:
        0 9px 22px rgba(220, 38, 38, 0.2);
}

.button-primary:hover {
    background:
        linear-gradient(
            135deg,
            #ef4444,
            #b91c1c
        );
}

.button-secondary {
    border: 1px solid var(--border-strong);
    background: #17171c;
    color: var(--text);
}

.button-secondary:hover {
    border-color: var(--primary-border);
    background: var(--primary-soft);
    color: #fecaca;
}

.button-danger {
    background:
        linear-gradient(
            135deg,
            #ef4444,
            #7f1d1d
        );

    color: #ffffff;
}

.button-danger:hover {
    background:
        linear-gradient(
            135deg,
            #f87171,
            #991b1b
        );
}

.topbar {
    border-bottom-color: var(--border);

    background:
        rgba(10, 10, 12, 0.94);

    backdrop-filter: blur(16px);
}

.main-nav a {
    color: var(--muted);
}

.main-nav a:hover {
    background: #19191e;
    color: var(--text);
}

.main-nav a.active {
    border: 1px solid var(--primary-border);
    background: var(--primary-soft);
    color: #fca5a5;
}

.summary-card,
.panel {
    border-color: var(--border);

    background:
        linear-gradient(
            145deg,
            #151519,
            #101013
        );

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.22);
}

.summary-card {
    position: relative;
    overflow: hidden;
}

.summary-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;

    height: 2px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(239, 68, 68, 0.78),
            transparent
        );

    content: "";
}

.summary-card span {
    color: var(--muted);
}

.value-positive {
    color: #f4f4f5;
}

.value-negative {
    color: #f87171;
}

.filter-tabs a {
    border-color: var(--border);
    background: #141418;
    color: var(--muted);
}

.filter-tabs a:hover {
    border-color: var(--primary-border);
    color: #fecaca;
}

.filter-tabs a.active {
    border-color: #dc2626;

    background:
        linear-gradient(
            135deg,
            #dc2626,
            #991b1b
        );

    color: #ffffff;
}

.data-table th,
.data-table td {
    border-bottom-color: var(--border);
}

.data-table th {
    color: #a1a1aa;
}

.data-table tbody tr:hover {
    background: rgba(220, 38, 38, 0.055);
}

.project-name-link:hover {
    color: #f87171;
}

.status-active {
    border: 1px solid rgba(248, 113, 113, 0.28);
    background: rgba(220, 38, 38, 0.14);
    color: #fca5a5;
}

.status-completed {
    border: 1px solid rgba(185, 28, 28, 0.34);
    background: rgba(127, 29, 29, 0.3);
    color: #fecaca;
}

.project-card {
    border-color: var(--border);

    background:
        linear-gradient(
            145deg,
            #16161a,
            #101013
        );
}

.project-card:hover {
    border-color: rgba(248, 113, 113, 0.48);

    box-shadow:
        0 16px 38px rgba(0, 0, 0, 0.35),
        0 0 0 1px rgba(220, 38, 38, 0.08);

    transform: translateY(-2px);
}

.input-with-suffix > span {
    color: #a1a1aa;
}

.notes-box {
    border: 1px solid var(--border);
    background: #0d0d10;
}

.detail-list > div {
    border-bottom-color: var(--border);
}

.detail-list dt {
    color: var(--muted);
}

.danger-zone {
    border-top-color: rgba(248, 113, 113, 0.26);
}

.danger-zone h3 {
    color: #f87171;
}

.empty-icon {
    border: 1px solid var(--primary-border);
    background: var(--primary-soft);
    color: #f87171;
}

.alert-error {
    border-color: rgba(248, 113, 113, 0.42);
    background: rgba(127, 29, 29, 0.28);
    color: #fecaca;
}

.alert-success {
    border-color: rgba(248, 113, 113, 0.28);
    background: rgba(69, 10, 10, 0.42);
    color: #fecaca;
}

.alert-info {
    border-color: rgba(248, 113, 113, 0.24);
    background: rgba(69, 10, 10, 0.3);
    color: #fca5a5;
}

.breadcrumb {
    color: var(--muted);
}

.breadcrumb a:hover {
    color: #f87171;
}

.form-actions {
    border-top-color: var(--border);
}

::-webkit-scrollbar {
    width: 11px;
    height: 11px;
}

::-webkit-scrollbar-track {
    background: #09090b;
}

::-webkit-scrollbar-thumb {
    border: 3px solid #09090b;
    border-radius: 999px;
    background: #3f3f46;
}

::-webkit-scrollbar-thumb:hover {
    background: #991b1b;
}

::selection {
    background: rgba(220, 38, 38, 0.48);
    color: #ffffff;
}

/* =========================================================
   Kulujen hallinta
   ========================================================= */

.category-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.category-summary-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 74px;
    padding: 16px 18px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background:
        linear-gradient(
            145deg,
            #151519,
            #101013
        );
}

.category-summary-card strong {
    font-size: 17px;
    white-space: nowrap;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    min-height: 27px;
    padding: 5px 10px;
    border: 1px solid rgba(248, 113, 113, 0.24);
    border-radius: 999px;
    background: rgba(127, 29, 29, 0.25);
    color: #fecaca;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.category-labor {
    border-color: rgba(248, 113, 113, 0.42);
    background: rgba(220, 38, 38, 0.2);
    color: #fecaca;
}

.category-equipment {
    border-color: rgba(239, 68, 68, 0.36);
    background: rgba(153, 27, 27, 0.26);
    color: #fca5a5;
}

.category-fuel {
    border-color: rgba(251, 113, 133, 0.32);
    background: rgba(159, 18, 57, 0.22);
    color: #fecdd3;
}

.category-materials {
    border-color: rgba(220, 38, 38, 0.3);
    background: rgba(127, 29, 29, 0.34);
    color: #fee2e2;
}

.category-subcontracting {
    border-color: rgba(185, 28, 28, 0.42);
    background: rgba(69, 10, 10, 0.52);
    color: #fca5a5;
}

.category-other {
    border-color: rgba(161, 161, 170, 0.28);
    background: rgba(63, 63, 70, 0.3);
    color: #d4d4d8;
}

.panel-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.expense-description {
    display: block;
    max-width: 280px;
    white-space: normal;
}

.inline-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.inline-actions form {
    margin: 0;
}

.expense-table td {
    vertical-align: middle;
}

@media (max-width: 1000px) {
    .category-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .category-summary-grid {
        grid-template-columns: 1fr;
    }

    .category-summary-card {
        min-height: 66px;
    }

    .panel-header-actions {
        align-items: flex-end;
        flex-direction: column;
    }

    .inline-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-actions .button {
        width: 100%;
    }
}