:root {
    color-scheme: light;
    --navy-950: #08182e;
    --navy-900: #10233f;
    --navy-800: #17365f;
    --blue-600: #1769e0;
    --blue-500: #2b7fff;
    --blue-100: #dceaff;
    --ink: #172033;
    --muted: #667085;
    --surface: #ffffff;
    --background: #f2f5fa;
    --line: #dbe3ef;
    --success: #087a55;
    --danger: #c93434;
    --shadow: 0 24px 70px rgba(8, 24, 46, 0.14);
}

.role-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 20px;
    margin-top: 28px;
}

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

.role-card {
    padding: 22px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 10px 35px rgba(16, 35, 63, 0.04);
}

.role-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.role-card h2 {
    margin: 0 0 4px;
    font-size: 1.1rem;
}

.role-card code,
.permission-choice small {
    color: var(--muted);
    font-size: 0.68rem;
}

.role-card fieldset {
    margin: 16px 0 0;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.role-card legend {
    padding: 0 6px;
    color: var(--navy-800);
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

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

.permission-choice {
    align-items: flex-start;
    padding: 8px;
    background: #f8fafd;
    border-radius: 9px;
}

.permission-choice span {
    display: grid;
}

.locked-note {
    margin: 16px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.sticky-card {
    position: sticky;
    top: 18px;
    height: max-content;
}

.form-card textarea {
    width: 100%;
    padding: 11px;
    border: 1px solid #b9c5d6;
    border-radius: 10px;
    font: inherit;
    resize: vertical;
}

@media (max-width: 920px) {
    .role-layout {
        grid-template-columns: 1fr;
    }

    .sticky-card {
        position: static;
    }
}

@media (max-width: 700px) {
    .permission-grid {
        grid-template-columns: 1fr;
    }
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 100% 0%, rgba(43, 127, 255, 0.14), transparent 34rem),
        var(--background);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

.shell {
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(48px, 8vw, 96px) 0;
}

.eyebrow {
    color: #a9cdfd;
    font-size: 0.72rem;
    font-weight: 850;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.eyebrow.dark {
    color: var(--blue-600);
}

.lead {
    color: var(--muted);
}

.hero {
    padding: clamp(28px, 6vw, 64px);
    color: #fff;
    background: linear-gradient(135deg, var(--navy-900), #164b91);
    border-radius: 28px;
    box-shadow: 0 22px 60px rgba(16, 35, 63, 0.17);
}

.hero h1,
.auth-brand h1 {
    margin: 18px 0;
    font-size: clamp(3rem, 10vw, 6rem);
    line-height: 0.9;
}

.hero p {
    max-width: 600px;
    color: #dceaff;
    font-size: clamp(1rem, 3vw, 1.25rem);
}

.status {
    display: inline-flex;
    gap: 9px;
    align-items: center;
    margin-top: 18px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 999px;
}

.status span {
    color: #6ee7b7;
    font-weight: 900;
}

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

article {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
    padding: 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(16, 35, 63, 0.04);
}

article strong {
    overflow-wrap: anywhere;
}

article span {
    color: var(--muted);
    font-size: 0.9rem;
}

/* Installation */

.install-page {
    width: min(1240px, calc(100% - 32px));
    margin: 0 auto;
    padding: clamp(20px, 4vw, 48px) 0;
}

.install-layout {
    display: grid;
    grid-template-columns: minmax(300px, 0.78fr) minmax(560px, 1.45fr);
    min-height: calc(100vh - 96px);
    overflow: hidden;
    background: var(--surface);
    border: 1px solid rgba(219, 227, 239, 0.9);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.install-aside {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: clamp(30px, 4vw, 54px);
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 105% 8%, rgba(81, 145, 255, 0.55), transparent 18rem),
        linear-gradient(155deg, var(--navy-950), var(--navy-800));
}

.install-aside::after {
    position: absolute;
    right: -120px;
    bottom: -150px;
    width: 330px;
    height: 330px;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    box-shadow:
        0 0 0 46px rgba(255, 255, 255, 0.025),
        0 0 0 92px rgba(255, 255, 255, 0.018);
}

.brand-lockup {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 13px;
    align-items: center;
}

.brand-lockup > span:last-child {
    display: grid;
    gap: 1px;
}

.brand-lockup strong {
    font-size: 1.05rem;
    letter-spacing: 0.01em;
}

.brand-lockup small {
    color: #9fb4d0;
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.brand-mark {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    background: linear-gradient(145deg, #438bff, #1769e0);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 13px;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
    font-size: 1.2rem;
    font-weight: 900;
}

.install-intro {
    position: relative;
    z-index: 1;
    margin: clamp(64px, 10vh, 110px) 0 50px;
}

.install-intro h1 {
    max-width: 460px;
    margin: 16px 0 20px;
    font-size: clamp(2.2rem, 4vw, 3.7rem);
    line-height: 0.98;
    letter-spacing: -0.055em;
}

.install-intro p {
    max-width: 440px;
    margin: 0;
    color: #b9c9dd;
    line-height: 1.7;
}

.setup-steps {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 22px;
    padding: 0;
    list-style: none;
}

.setup-steps li {
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 13px;
    align-items: center;
    color: #8095b1;
}

.setup-steps li > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    font-size: 0.76rem;
    font-weight: 800;
}

.setup-steps li div {
    display: grid;
    gap: 2px;
}

.setup-steps li strong {
    font-size: 0.9rem;
}

.setup-steps li small {
    font-size: 0.76rem;
}

.setup-steps li.active {
    color: #fff;
}

.setup-steps li.active > span {
    background: var(--blue-500);
    border-color: var(--blue-500);
    box-shadow: 0 8px 20px rgba(43, 127, 255, 0.34);
}

.security-note {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 9px;
    align-items: center;
    margin-top: auto;
    padding-top: 36px;
    color: #9fb4d0;
    font-size: 0.78rem;
}

.security-note > span {
    color: #6ee7b7;
}

.install-panel {
    padding: clamp(28px, 4.4vw, 62px);
}

.panel-heading {
    display: flex;
    gap: 28px;
    align-items: flex-start;
    justify-content: space-between;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.panel-heading h2 {
    margin: 9px 0 8px;
    color: var(--navy-950);
    font-size: clamp(1.65rem, 3vw, 2.45rem);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.panel-heading p {
    max-width: 560px;
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}

.health-score {
    display: grid;
    min-width: 74px;
    padding: 12px;
    text-align: center;
    background: #eef8f4;
    border: 1px solid #c9eadf;
    border-radius: 15px;
}

.health-score strong {
    color: var(--success);
    font-size: 1.05rem;
}

.health-score span {
    color: #477467;
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 30px 0 15px;
}

.section-heading > div {
    display: flex;
    gap: 10px;
    align-items: center;
}

.section-heading h3 {
    margin: 0;
    color: var(--navy-950);
    font-size: 1rem;
}

.section-heading small {
    color: var(--muted);
}

.section-number {
    color: var(--blue-600);
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.08em;
}

.checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 0;
    list-style: none;
}

.checks li {
    display: grid;
    grid-template-columns: 27px 1fr auto;
    gap: 9px;
    align-items: center;
    min-width: 0;
    padding: 10px 12px;
    background: #fbfcfe;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.checks li > span {
    display: grid;
    width: 23px;
    height: 23px;
    place-items: center;
    color: #fff;
    border-radius: 50%;
    font-size: 0.72rem;
    font-weight: 900;
}

.checks strong {
    min-width: 0;
    overflow: hidden;
    font-size: 0.78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.checks small {
    color: var(--muted);
    font-size: 0.68rem;
}

.checks .passed > span {
    background: var(--success);
}

.checks .failed {
    background: #fff8f8;
    border-color: #f3cece;
}

.checks .failed > span {
    background: var(--danger);
}

.account-heading {
    margin-top: 34px;
}

form {
    display: grid;
    gap: 16px;
}

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

label {
    display: grid;
    gap: 7px;
    color: #344054;
    font-size: 0.82rem;
    font-weight: 750;
}

input {
    width: 100%;
    padding: 12px 13px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #b9c5d6;
    border-radius: 10px;
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

input::placeholder {
    color: #98a2b3;
}

input:focus {
    border-color: var(--blue-600);
    outline: 0;
    box-shadow: 0 0 0 4px rgba(23, 105, 224, 0.12);
}

.hint {
    margin: -3px 0 0;
    color: var(--muted);
    font-size: 0.76rem;
}

.form-span-2 {
    grid-column: 1 / -1;
}

.smtp-option {
    display: grid;
    gap: 16px;
    padding: 18px;
    background: #f7fbf4;
    border: 1px solid #dcebd2;
    border-radius: 16px;
}

.smtp-option > p {
    margin: -7px 0 0 58px;
    color: var(--muted);
    font-size: 0.78rem;
    line-height: 1.5;
}

.smtp-grid {
    transition: opacity 160ms ease;
}

.smtp-grid.is-disabled {
    opacity: .55;
}

.switch-field {
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: pointer;
}

.switch-field input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.switch-field > span {
    position: relative;
    width: 46px;
    height: 26px;
    flex: 0 0 46px;
    background: #cbd7cf;
    border-radius: 999px;
    transition: background-color 160ms ease;
}

.switch-field > span::after {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 18px;
    height: 18px;
    content: "";
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(22, 55, 43, .2);
    transition: transform 160ms ease;
}

.switch-field input:checked + span {
    background: #7cc637;
}

.switch-field input:checked + span::after {
    transform: translateX(20px);
}

.switch-field input:focus-visible + span {
    outline: 3px solid rgba(124, 198, 55, .24);
    outline-offset: 2px;
}

button {
    padding: 13px 17px;
    color: #fff;
    background: var(--blue-600);
    border: 0;
    border-radius: 10px;
    font-weight: 800;
    cursor: pointer;
}

.primary-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 3px;
    padding: 14px 17px;
    background: linear-gradient(135deg, var(--blue-600), #0b55c4);
    box-shadow: 0 10px 24px rgba(23, 105, 224, 0.22);
}

.primary-action:hover {
    background: linear-gradient(135deg, #1d73eb, #0b55c4);
}

.alert {
    margin: 20px 0;
    padding: 13px 15px;
    color: #8b1b1b;
    background: #fff0f0;
    border: 1px solid #ffc9c9;
    border-radius: 12px;
}

/* Authentication and dashboard */

.auth-shell {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 20px;
    max-width: 980px;
}

.auth-brand,
.auth-card {
    padding: clamp(28px, 5vw, 52px);
    border-radius: 24px;
}

.auth-brand {
    color: #fff;
    background: linear-gradient(135deg, var(--navy-900), #164b91);
}

.auth-brand p {
    color: #dceaff;
}

.auth-card {
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: 0 18px 60px rgba(16, 35, 63, 0.08);
}

.auth-card h2 {
    margin-top: 0;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px max(20px, calc((100% - 1080px) / 2));
    background: #fff;
    border-bottom: 1px solid var(--line);
}

.topbar form {
    display: block;
}

.quiet-button {
    padding: 9px 13px;
    color: var(--navy-900);
    background: #edf3fb;
}

.dashboard-shell {
    padding-top: 36px;
}

.dashboard-title {
    display: flex;
    gap: 10px;
    align-items: center;
    margin: 9px 0 8px;
    color: var(--navy-900);
    font-size: clamp(1.65rem, 2.7vw, 2.25rem);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.greeting-wave {
    display: inline-block;
    flex: 0 0 auto;
    font-size: .75em;
    transform-origin: 70% 70%;
    animation: greeting-wave 5s ease-in-out infinite;
}

.dashboard-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.dashboard-heading p {
    margin: 0;
    color: var(--muted);
}

.dashboard-heading time {
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    color: var(--navy-800);
    background: rgba(255, 255, 255, .75);
    font-size: .78rem;
    font-weight: 800;
}

.dashboard-heading-meta {
    display: flex;
    gap: 10px;
    align-items: center;
}

.live-status {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 9px 12px;
    color: #245841;
    background: rgba(244, 253, 238, .9);
    border: 1px solid #d9ebcf;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 800;
}

.live-status i {
    width: 8px;
    height: 8px;
    background: #8fe829;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(143, 232, 41, .13), 0 0 15px rgba(143, 232, 41, .9);
    animation: live-neon 1.8s ease-in-out infinite;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 22px;
}

.metric-card {
    display: flex;
    flex-direction: row;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 92px;
    padding: 15px 17px;
    border: 1px solid var(--line);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(16, 35, 63, .055);
}

.metric-copy {
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 11px;
    align-items: center;
    min-width: 0;
}

.metric-copy > div {
    min-width: 0;
}

.metric-copy small,
.metric-value,
.metric-copy p {
    display: block;
}

.metric-copy small {
    color: #29483c;
    font-size: .75rem;
    font-weight: 850;
}

.metric-value {
    margin-left: auto;
    color: var(--navy-950);
    font-size: clamp(1.55rem, 2.2vw, 2.05rem);
    line-height: 1;
    letter-spacing: -.04em;
    text-align: right;
}

.metric-copy p {
    margin: 4px 0 0;
    overflow: hidden;
    color: var(--muted);
    font-size: .68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-icon {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    border-radius: 12px;
    font-weight: 900;
}

@keyframes live-neon {
    0%, 100% { opacity: .72; transform: scale(.9); box-shadow: 0 0 0 3px rgba(143, 232, 41, .1), 0 0 8px rgba(143, 232, 41, .55); }
    50% { opacity: 1; transform: scale(1.08); box-shadow: 0 0 0 5px rgba(143, 232, 41, .15), 0 0 20px rgba(143, 232, 41, 1); }
}

@keyframes greeting-wave {
    0%, 76%, 100% { transform: rotate(0); }
    80% { transform: rotate(16deg); }
    84% { transform: rotate(-10deg); }
    88% { transform: rotate(14deg); }
    92% { transform: rotate(-6deg); }
    96% { transform: rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
    .live-status i,
    .greeting-wave {
        animation: none;
    }
}

.metric-icon.blue { color: #1d4ed8; background: #dbeafe; }
.metric-icon.green { color: #047857; background: #d1fae5; }
.metric-icon.amber { color: #b45309; background: #fef3c7; }
.metric-icon.red { color: #b91c1c; background: #fee2e2; }
.metric-card.critical { border-color: #fecaca; }

.dashboard-primary-grid,
.dashboard-secondary-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr);
    gap: 18px;
    margin-top: 18px;
}

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

.dashboard-card {
    min-width: 0;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 36px rgba(16, 35, 63, .055);
}

.dashboard-card > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.dashboard-card h2 {
    margin: 4px 0 0;
    color: var(--navy-950);
    font-size: 1.05rem;
}

.dashboard-card > header > a {
    color: var(--blue-600);
    font-size: .75rem;
    font-weight: 800;
    text-decoration: none;
}

.line-chart-wrap {
    position: relative;
    height: 230px;
    margin-top: 18px;
    padding: 12px 8px 0 0;
    overflow: hidden;
    background:
        radial-gradient(circle at 70% 0, rgba(170, 238, 86, .12), transparent 38%),
        linear-gradient(180deg, rgba(249, 253, 247, .8), rgba(255, 255, 255, 0));
    border-radius: 14px;
}

.chart-footnote {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    color: var(--muted);
    font-size: .7rem;
}

.chart-footnote span {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    color: #315d47;
    font-weight: 800;
}

.chart-footnote i {
    width: 8px;
    height: 8px;
    background: #8dde39;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(141, 222, 57, .75);
}

.card-kicker {
    color: var(--muted);
    font-size: .66rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.soft-badge {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: .7rem;
    font-weight: 800;
}

.bar-chart {
    display: grid;
    height: 190px;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: end;
    gap: clamp(8px, 2vw, 20px);
    margin-top: 24px;
}

.bar-column {
    display: grid;
    height: 100%;
    grid-template-rows: 20px 1fr 20px;
    gap: 5px;
    color: var(--muted);
    font-size: .68rem;
    text-align: center;
}

.bar-value {
    color: var(--navy-800);
    font-weight: 800;
}

.bar-track {
    position: relative;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
    border-radius: 9px;
    background: #eff4fa;
}

.bar-track i {
    display: block;
    width: 100%;
    min-height: 4px;
    border-radius: 9px;
    background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.chart-level-0 { height: 2%; }
.chart-level-1 { height: 10%; }
.chart-level-2 { height: 20%; }
.chart-level-3 { height: 30%; }
.chart-level-4 { height: 40%; }
.chart-level-5 { height: 50%; }
.chart-level-6 { height: 60%; }
.chart-level-7 { height: 70%; }
.chart-level-8 { height: 80%; }
.chart-level-9 { height: 90%; }
.chart-level-10 { height: 100%; }

.quick-actions,
.compact-list,
.distribution-list {
    display: grid;
    margin-top: 16px;
}

.quick-actions a {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    padding: 11px 0;
    border-bottom: 1px solid var(--line);
    color: var(--ink);
    text-decoration: none;
}

.quick-actions a:last-child {
    border-bottom: 0;
}

.quick-actions a > span {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    color: #1d4ed8;
    background: #eff6ff;
    font-weight: 900;
}

.quick-actions a div,
.quick-actions a strong,
.quick-actions a small {
    display: block;
    min-width: 0;
}

.quick-actions a strong {
    font-size: .82rem;
}

.quick-actions a small {
    margin-top: 3px;
    color: var(--muted);
    font-size: .69rem;
}

.quick-actions a b {
    color: var(--blue-600);
}

.stock-alert-row,
.movement-row {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 11px;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.stock-alert-row:last-child,
.movement-row:last-child {
    border-bottom: 0;
}

.alert-mark,
.movement-mark {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 10px;
    font-weight: 900;
}

.alert-mark {
    color: #b91c1c;
    background: #fee2e2;
}

.movement-mark {
    color: #1d4ed8;
    background: #dbeafe;
}

.stock-alert-row > div,
.movement-row > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.stock-alert-row > div:last-child,
.movement-row > div:last-child {
    text-align: right;
}

.stock-alert-row strong,
.movement-row strong {
    overflow: hidden;
    font-size: .78rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stock-alert-row small,
.movement-row small {
    color: var(--muted);
    font-size: .66rem;
}

.distribution-card {
    margin-top: 18px;
}

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

.distribution-list > div {
    display: grid;
    grid-template-columns: minmax(110px, .7fr) minmax(100px, 1fr) auto;
    align-items: center;
    gap: 12px;
    font-size: .74rem;
}

.distribution-list > div > span {
    color: var(--muted);
}

.progress-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9eff7;
}

.progress-track i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.width-level-0 { width: 2%; }
.width-level-1 { width: 10%; }
.width-level-2 { width: 20%; }
.width-level-3 { width: 30%; }
.width-level-4 { width: 40%; }
.width-level-5 { width: 50%; }
.width-level-6 { width: 60%; }
.width-level-7 { width: 70%; }
.width-level-8 { width: 80%; }
.width-level-9 { width: 90%; }
.width-level-10 { width: 100%; }

.dashboard-empty {
    margin: 8px 0 0;
    padding: 24px 12px;
    color: var(--muted);
    border: 1px dashed var(--line);
    border-radius: 12px;
    font-size: .78rem;
    text-align: center;
}

.access-note {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 18px;
}

.access-note > span {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    color: #1d4ed8;
    background: #dbeafe;
    font-weight: 900;
}

.access-note h2,
.access-note p {
    margin: 0;
}

.access-note p {
    margin-top: 4px;
    color: var(--muted);
    font-size: .78rem;
}

@media (max-width: 1280px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-primary-grid {
        grid-template-columns: minmax(0, 1.4fr) minmax(280px, .8fr);
    }
}

@media (max-width: 980px) {
    .dashboard-primary-grid,
    .dashboard-secondary-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .distribution-list {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .dashboard-shell {
        padding-top: 20px;
    }

    .dashboard-heading {
        display: grid;
    }

    .dashboard-heading time {
        width: max-content;
    }

    .dashboard-heading-meta {
        justify-content: space-between;
    }

    .metric-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 11px;
        margin-top: 20px;
    }

    .metric-card {
        min-height: 84px;
        padding: 13px 14px;
    }

    .dashboard-card {
        padding: 18px 15px;
    }

    .bar-chart {
        height: 165px;
        gap: 7px;
    }

    .line-chart-wrap {
        height: 190px;
        margin-top: 14px;
    }

    .stock-alert-row,
    .movement-row {
        grid-template-columns: 30px minmax(0, 1fr);
    }

    .stock-alert-row > div:last-child,
    .movement-row > div:last-child {
        grid-column: 2;
        grid-row: 2;
        grid-template-columns: auto auto;
        justify-content: start;
        gap: 8px;
        text-align: left;
    }

    .distribution-list > div {
        grid-template-columns: minmax(100px, .8fr) minmax(80px, 1fr) auto;
        gap: 8px;
    }
}

/* Mevam açık yeşil tasarım sistemi */
:root {
    --navy-950: #10261f;
    --navy-900: #18372d;
    --navy-800: #245343;
    --blue-600: #16715a;
    --blue-500: #a8ed45;
    --blue-100: #effbdc;
    --ink: #17231f;
    --muted: #77817d;
    --background: #f7faf7;
    --line: #e4ebe6;
    --success: #16805d;
    --shadow: 0 20px 60px rgba(20, 55, 43, .09);
}

.app-body {
    background: #fff;
}

.app-sidebar {
    width: 252px;
    color: #32483f;
    border-right: 1px solid #e4ebe6;
    background: rgba(255, 255, 255, .97);
    box-shadow: 12px 0 40px rgba(28, 63, 50, .035);
}

.app-main {
    width: calc(100% - 252px);
    margin-left: 252px;
}

.sidebar-brand {
    color: #14362a;
}

.brand-mark {
    color: #173d2f;
    background: #a8ed45;
    box-shadow: 0 8px 20px rgba(136, 207, 45, .2);
}

.sidebar-brand small,
.sidebar-user small {
    color: #87958f;
}

.sidebar-nav .nav-label {
    color: #9aa6a1;
}

.sidebar-nav a {
    color: #63716b;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #18372d;
    background: #f0f9e6;
}

.sidebar-nav a.active {
    box-shadow: inset 3px 0 #8cda2d;
}

.nav-icon {
    color: #4b695d;
    background: #f0f4f1;
}

.sidebar-nav a.active .nav-icon,
.sidebar-nav a:hover .nav-icon {
    color: #28543f;
    background: #dff6bf;
}

.sidebar-user {
    border-top-color: #e7ede8;
}

.sidebar-user .avatar,
.avatar {
    color: #fff;
    background: linear-gradient(145deg, #1e5946, #123c30);
}

.app-topbar {
    border-bottom-color: rgba(225, 234, 227, .9);
    background: rgba(255, 255, 255, .92);
}

.page-content {
    background: transparent;
}

button {
    color: #193628;
    background: #a8ed45;
}

.primary-action {
    color: #193628;
    background: linear-gradient(135deg, #b6f45a, #99e334);
    box-shadow: 0 10px 24px rgba(133, 205, 43, .2);
}

.primary-action:hover {
    background: linear-gradient(135deg, #c0f76d, #93d92f);
}

.quiet-button {
    color: #29483c;
    background: #f0f5f1;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #75bd32;
    box-shadow: 0 0 0 4px rgba(153, 227, 52, .15);
}

.metric-card,
.dashboard-card,
.data-card,
.form-card,
.role-card,
.warehouse-card {
    border-color: #e5ece7;
    box-shadow: 0 12px 34px rgba(23, 61, 47, .045);
}

.metric-icon.blue,
.metric-icon.green {
    color: #276347;
    background: #e7f8d3;
}

.metric-icon.amber {
    color: #7b651a;
    background: #f5f8d8;
}

.metric-card.critical {
    border-color: #f0e7c7;
}

.soft-badge,
.count-badge {
    color: #315d47;
    background: #eef9e3;
}

.bar-track {
    background: #f0f4f1;
}

.bar-track i {
    background: linear-gradient(180deg, #b7f262, #82cf2c);
}

.progress-track {
    background: #edf2ee;
}

.progress-track i {
    background: linear-gradient(90deg, #1b775c, #a8ed45);
}

.quick-actions a > span,
.movement-mark,
.access-note > span {
    color: #286047;
    background: #eaf8db;
}

.quick-actions a b,
.dashboard-card > header > a {
    color: #3d7a36;
}

.state-badge.active,
.success-message {
    color: #176347;
    background: #e9f8e8;
}

.module-icon {
    color: #18372d;
    background: linear-gradient(145deg, #b7f15f, #91dc32);
}

@media (max-width: 1024px) {
    .app-main {
        width: 100%;
        margin-left: 0;
    }
}

.topnav {
    display: flex;
    gap: 6px;
    margin-right: 20px;
    margin-left: auto;
}

.topnav a {
    padding: 8px 10px;
    color: var(--muted);
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 750;
    text-decoration: none;
}

.topnav a:hover {
    color: var(--navy-950);
    background: #edf3fb;
}

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

.module-card {
    display: grid;
    grid-template-columns: 44px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 20px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 17px;
    box-shadow: 0 10px 32px rgba(16, 35, 63, 0.05);
    text-decoration: none;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.module-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 38px rgba(16, 35, 63, 0.09);
}

.module-card div {
    display: grid;
    gap: 5px;
}

.module-card small {
    color: var(--muted);
}

.module-card b {
    color: var(--blue-600);
}

.module-icon {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, var(--blue-500), var(--blue-600));
    border-radius: 12px;
    font-weight: 900;
}

.wordmark{color:var(--navy-950);font-weight:900;text-decoration:none}.management-shell{padding-top:48px}.page-heading{display:flex;gap:24px;align-items:flex-start;justify-content:space-between}.page-heading h1{margin:10px 0 8px;color:var(--navy-950);font-size:clamp(2rem,5vw,3.3rem);letter-spacing:-.04em}.page-heading p{margin:0;color:var(--muted)}.count-badge,.state-badge{padding:8px 11px;background:#eaf1fb;border-radius:999px;color:var(--navy-800);font-size:.75rem;font-weight:800}.management-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(300px,.7fr);gap:20px;margin-top:28px}.data-card,.form-card{padding:24px;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 10px 35px rgba(16,35,63,.05)}.data-card h2,.form-card h2{margin:0 0 18px}.form-card>p{margin:-10px 0 20px;color:var(--muted);font-size:.85rem}.responsive-list{display:grid}.user-row{display:grid;grid-template-columns:42px minmax(160px,1fr) minmax(150px,.8fr) auto;gap:14px;align-items:center;padding:15px 0;border:0;border-bottom:1px solid var(--line);border-radius:0;box-shadow:none}.user-row:last-child{border-bottom:0}.user-row>div{display:grid;gap:3px}.user-row span,.user-row small{color:var(--muted);font-size:.78rem}.avatar{display:grid!important;width:40px;height:40px;place-items:center;color:#fff;background:linear-gradient(145deg,var(--blue-500),var(--blue-600));border-radius:12px;font-weight:900}.state-badge.active{color:var(--success);background:#e9f7f2}.form-card fieldset{display:grid;gap:7px;margin:0;padding:12px;border:1px solid var(--line);border-radius:11px}.form-card legend{padding:0 5px;font-size:.8rem;font-weight:800}.choice{display:flex;grid-template-columns:none;gap:9px;align-items:center;font-weight:600}.choice input{width:16px;height:16px}.success-message{margin-top:20px;padding:13px 15px;color:#086347;background:#e9f7f2;border:1px solid #bce7d8;border-radius:12px}.text-link{color:var(--blue-600);font-size:.84rem;font-weight:750;text-align:center;text-decoration:none}.text-link:hover{text-decoration:underline}

@media (max-width: 920px) {
    .install-page {
        width: min(760px, calc(100% - 24px));
    }

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

    .install-aside {
        min-height: auto;
        padding: 28px;
    }

    .install-intro {
        margin: 45px 0 28px;
    }

    .install-intro h1 {
        max-width: 620px;
        font-size: clamp(2.3rem, 7vw, 3.8rem);
    }

    .setup-steps {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
    }

    .setup-steps li {
        grid-template-columns: 30px 1fr;
    }

    .setup-steps li small {
        display: none;
    }

    .security-note {
        padding-top: 28px;
    }

    .management-grid{grid-template-columns:1fr}
}

@media (max-width: 700px) {
    .topnav {
        display: none;
    }

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

    .grid,
    .form-grid,
    .checks,
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .form-span-2 {
        grid-column: 1;
    }

    .shell {
        width: min(100% - 20px, 1080px);
        padding: 20px 0;
    }

    .hero,
    .auth-brand,
    .auth-card {
        border-radius: 18px;
    }

    .auth-brand h1 {
        font-size: 3.5rem;
    }

    .user-row{grid-template-columns:42px 1fr auto}.user-row>div:nth-child(3){grid-column:2}.page-heading{display:grid}.count-badge{width:max-content}
}

@media (max-width: 520px) {
    .install-page {
        width: 100%;
        padding: 0;
    }

    .install-layout {
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .install-aside,
    .install-panel {
        padding: 24px 20px;
    }

    .install-intro {
        margin: 42px 0 30px;
    }

    .install-intro h1 {
        font-size: 2.5rem;
    }

    .setup-steps {
        display: none;
    }

    .panel-heading {
        gap: 14px;
    }

    .panel-heading p {
        font-size: 0.9rem;
    }

    .health-score {
        min-width: 67px;
    }

    .section-heading small {
        display: none;
    }

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

    .checks li {
        grid-template-columns: 24px 1fr;
        padding: 10px;
    }

    .checks small {
        grid-column: 2;
    }
}

/* Ortak uygulama kabuğu */
.app-body {
    min-width: 320px;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 100% 0, rgba(37, 99, 235, .12), transparent 32rem),
        #f4f7fb;
}

.app-layout {
    min-height: 100vh;
}

.app-sidebar {
    position: fixed;
    z-index: 50;
    inset: 0 auto 0 0;
    display: flex;
    width: 270px;
    flex-direction: column;
    padding: 24px 18px 18px;
    overflow-y: auto;
    color: #dce8fb;
    background: linear-gradient(180deg, #0c1c36 0%, #10284a 100%);
    box-shadow: 18px 0 50px rgba(15, 35, 66, .12);
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 24px;
    color: #fff;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 13px;
    color: #0d2b57;
    background: #fff;
    font-size: 1.15rem;
    font-weight: 900;
}

.sidebar-brand strong,
.sidebar-brand small {
    display: block;
}

.sidebar-brand strong {
    font-size: 1.05rem;
}

.sidebar-brand small,
.sidebar-user small {
    margin-top: 3px;
    color: #91a8c8;
    font-size: .73rem;
}

.sidebar-nav {
    display: grid;
    gap: 5px;
}

.sidebar-nav .nav-label {
    margin: 18px 10px 7px;
    color: #7190b9;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 46px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #bed0e8;
    text-decoration: none;
    font-size: .91rem;
    font-weight: 700;
    transition: color .18s ease, background .18s ease, transform .18s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #fff;
    background: rgba(255, 255, 255, .1);
    transform: translateX(2px);
}

.sidebar-nav a.active {
    box-shadow: inset 3px 0 #60a5fa;
}

.nav-icon {
    display: grid;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    place-items: center;
    border-radius: 8px;
    color: #bfdbfe;
    background: rgba(255, 255, 255, .08);
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: auto;
    padding: 18px 8px 4px;
    border-top: 1px solid rgba(255, 255, 255, .09);
}

.sidebar-user .avatar {
    color: #10284a;
    background: #dbeafe;
}

.sidebar-user strong,
.sidebar-user small {
    display: block;
    max-width: 165px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-main {
    width: calc(100% - 270px);
    min-width: 0;
    min-height: 100vh;
    margin-left: 270px;
}

.app-topbar {
    position: sticky;
    z-index: 35;
    top: 0;
    display: flex;
    min-height: 72px;
    align-items: center;
    gap: 14px;
    padding: 10px clamp(18px, 2.5vw, 38px);
    border-bottom: 1px solid rgba(186, 202, 224, .7);
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(14px);
}

.app-topbar > div {
    display: grid;
}

.app-topbar small {
    color: var(--muted);
    font-size: .7rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.app-topbar strong {
    color: var(--ink);
    font-size: .98rem;
}

.app-topbar form {
    margin-left: auto;
}

.page-content {
    width: 100%;
    min-width: 0;
    padding: clamp(24px, 3vw, 46px);
}

.page-section,
.app-main .shell {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
}

.burger-button {
    display: none;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-content: center;
    gap: 5px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    box-shadow: none;
}

.burger-button span {
    display: block;
    width: 19px;
    height: 2px;
    border-radius: 2px;
    background: var(--ink);
    transition: transform .2s ease, opacity .2s ease;
}

.burger-button:hover {
    transform: none;
    background: #f1f5f9;
}

.sidebar-overlay {
    position: fixed;
    z-index: 45;
    inset: 0;
    display: none;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: rgba(4, 13, 29, .52);
    box-shadow: none;
    backdrop-filter: blur(2px);
}

.sidebar-overlay:hover {
    transform: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 1024px) {
    .app-sidebar {
        transform: translateX(-105%);
        transition: transform .24s ease;
    }

    .app-main {
        width: 100%;
        margin-left: 0;
    }

    .burger-button {
        display: grid;
    }

    .sidebar-open {
        overflow: hidden;
    }

    .sidebar-open .app-sidebar {
        transform: translateX(0);
    }

    .sidebar-open .sidebar-overlay {
        display: block;
    }

    .sidebar-open .burger-button span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .sidebar-open .burger-button span:nth-child(2) {
        opacity: 0;
    }

    .sidebar-open .burger-button span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}

@media (max-width: 700px) {
    .app-topbar {
        min-height: 64px;
        padding: 8px 12px;
    }

    .app-topbar .quiet-button {
        padding: 10px 12px;
        font-size: .78rem;
    }

    .page-content {
        padding: 20px 14px 30px;
    }

    .app-main .page-heading h1 {
        font-size: clamp(1.8rem, 9vw, 2.6rem);
    }

    .app-main .dashboard-title {
        font-size: clamp(1.55rem, 7vw, 1.9rem);
    }

    .role-layout,
    .management-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .permission-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .sticky-card {
        position: static;
    }
}

@media (max-width: 420px) {
    .app-sidebar {
        width: min(86vw, 300px);
    }

    .app-topbar small {
        display: none;
    }

    .app-topbar strong {
        max-width: 112px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .app-topbar .quiet-button {
        font-size: 0;
    }

    .app-topbar .quiet-button::after {
        content: "Çıkış";
        font-size: .78rem;
    }

    .user-row {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .user-row > div:nth-child(3),
    .user-row .state-badge {
        grid-column: 2;
    }
}

.form-stack {
    display: grid;
    align-content: start;
    gap: 18px;
}

.compact-card {
    padding-top: 22px;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}

.data-table th,
.data-table td {
    padding: 15px 13px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: middle;
}

.data-table th {
    color: var(--muted);
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.empty-state {
    padding: 35px 18px !important;
    color: var(--muted);
    text-align: center !important;
}

.warehouse-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 10px;
}

.warehouse-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 15px;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(23, 61, 47, .045);
}

.warehouse-card h2 {
    margin: 6px 0 3px;
    font-size: 1rem;
}

.warehouse-card p {
    margin: 0;
    color: var(--muted);
    font-size: .75rem;
}

.warehouse-card code {
    color: #477064;
    font-size: .68rem;
    font-weight: 800;
}

@media (max-width: 700px) {
    .data-table,
    .data-table tbody,
    .data-table tr,
    .data-table td {
        display: block;
        width: 100%;
    }

    .data-table thead {
        display: none;
    }

    .data-table tr {
        padding: 12px 0;
        border-bottom: 1px solid var(--line);
    }

    .data-table td {
        display: grid;
        grid-template-columns: minmax(90px, 36%) minmax(0, 1fr);
        gap: 10px;
        padding: 7px 12px;
        border: 0;
    }

    .data-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: .7rem;
        font-weight: 800;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .warehouse-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Ortak layout için nihai tema katmanı; responsive kabuktan sonra gelmelidir. */
.app-body {
    background: #fff;
}

.app-sidebar {
    width: 252px;
    color: #32483f;
    border-right: 1px solid #e4ebe6;
    background: rgba(255, 255, 255, .98);
    box-shadow: 12px 0 40px rgba(28, 63, 50, .035);
}

.app-main {
    width: calc(100% - 252px);
    margin-left: 252px;
}

.sidebar-brand { color: #14362a; }
.brand-mark {
    color: #173d2f;
    background: #a8ed45;
    box-shadow: 0 8px 20px rgba(136, 207, 45, .2);
}
.sidebar-brand small,
.sidebar-user small { color: #87958f; }
.sidebar-nav .nav-label { color: #9aa6a1; }
.sidebar-nav a { color: #63716b; }
.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: #18372d;
    background: #f0f9e6;
}
.sidebar-nav a.active { box-shadow: inset 3px 0 #8cda2d; }
.nav-icon {
    color: #4b695d;
    background: #f0f4f1;
}
.sidebar-nav a.active .nav-icon,
.sidebar-nav a:hover .nav-icon {
    color: #28543f;
    background: #dff6bf;
}
.sidebar-user { border-top-color: #e7ede8; }
.sidebar-user .avatar {
    color: #fff;
    background: linear-gradient(145deg, #1e5946, #123c30);
}
.app-topbar {
    border-bottom-color: rgba(225, 234, 227, .9);
    background: rgba(255, 255, 255, .94);
}

@media (max-width: 1024px) {
    .app-main {
        width: 100%;
        margin-left: 0;
    }
}

@media (max-width: 420px) {
    .app-sidebar {
        width: min(86vw, 300px);
    }
}

.location-section {
    margin-top: 42px;
    scroll-margin-top: 92px;
}

.section-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.section-toolbar h2 {
    margin: 8px 0 5px;
    color: var(--navy-950);
    font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.section-toolbar p {
    margin: 0;
    color: var(--muted);
}

.filter-form {
    display: flex;
    align-items: end;
    gap: 9px;
}

.filter-form label {
    min-width: 210px;
}

.filter-form select {
    min-height: 42px;
}

.secondary-button {
    min-height: 42px;
    padding: 10px 14px;
    color: #315345;
    background: #edf3ee;
}

.location-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 18px;
    align-items: start;
    margin-top: 20px;
}

.location-data-card {
    min-width: 0;
    padding: 0;
    overflow: hidden;
}

.data-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.data-card-heading h3 {
    margin: 0;
    font-size: .95rem;
}

.data-card-heading span {
    color: var(--muted);
    font-size: .72rem;
}

.location-list {
    display: grid;
}

.location-item {
    position: relative;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line);
}

.location-item:last-child {
    border-bottom: 0;
}

.location-edit-form {
    display: grid;
    grid-template-columns: minmax(145px, 1.2fr) repeat(5, minmax(78px, .7fr)) minmax(88px, .7fr) 38px;
    gap: 9px;
    align-items: end;
}

.location-edit-form label {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.location-edit-form label > span {
    color: var(--muted);
    font-size: .62rem;
    font-weight: 800;
}

.location-edit-form input {
    min-width: 0;
    padding: 9px 10px;
    font-size: .76rem;
}

.location-identity {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
    padding-bottom: 2px;
}

.location-identity > div {
    display: grid;
    min-width: 0;
    gap: 3px;
}

.location-identity strong,
.location-identity small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location-identity strong {
    font-size: .78rem;
}

.location-identity small {
    color: var(--muted);
    font-size: .64rem;
}

.location-icon {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    place-items: center;
    border-radius: 10px;
    color: #315d47;
    background: #eaf8db;
}

.location-balance {
    display: grid;
    gap: 3px;
    padding-bottom: 7px;
    font-size: .68rem;
}

.location-balance small {
    color: var(--muted);
}

.icon-button {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    padding: 0;
    border-radius: 10px;
}

.location-status-form {
    display: flex;
    justify-content: flex-end;
    margin-top: 8px;
}

.status-action {
    padding: 7px 10px;
    border-radius: 8px;
    font-size: .66rem;
}

.status-action.deactivate {
    color: #9b3030;
    background: #fff0f0;
}

.status-action.activate {
    color: #176347;
    background: #e9f8e8;
}

.status-action:disabled {
    color: #8a8170;
    background: #f4f0e8;
    cursor: not-allowed;
    opacity: .8;
}

.location-readonly {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
    gap: 14px;
    align-items: center;
    font-size: .76rem;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 16px 18px;
    border-top: 1px solid var(--line);
}

.pagination a {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 8px;
    color: var(--muted);
    background: #f3f6f4;
    font-size: .72rem;
    font-weight: 800;
    text-decoration: none;
}

.pagination a.active {
    color: #234633;
    background: #a8ed45;
}

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

@media (max-width: 1350px) {
    .location-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .location-layout .sticky-card {
        position: static;
    }
}

@media (max-width: 1120px) {
    .location-edit-form {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .location-identity {
        grid-column: span 2;
    }

    .location-balance {
        align-self: center;
    }
}

@media (max-width: 700px) {
    .section-toolbar,
    .filter-form {
        display: grid;
        align-items: stretch;
    }

    .filter-form label {
        min-width: 0;
    }

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

    .location-identity {
        grid-column: 1 / -1;
    }

    .location-balance {
        align-self: end;
    }

    .location-status-form {
        justify-content: stretch;
    }

    .location-status-form button {
        width: 100%;
    }

    .location-readonly {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .location-readonly > span:nth-child(2) {
        grid-column: 1 / -1;
    }
}

@media (max-width: 430px) {
    .location-edit-form,
    .form-grid.two-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    .location-identity,
    .location-balance {
        grid-column: 1;
    }

    .save-location {
        width: 100%;
    }
}

/* Form kontrol standardı */
button,
input,
select,
textarea {
    font: inherit;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    color: #233c32;
    border: 1px solid #d7e1da;
    border-radius: 12px;
    outline: 0;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(22, 55, 43, .025);
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

select {
    padding-right: 42px;
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, #617269 50%),
        linear-gradient(135deg, #617269 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 13px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    cursor: pointer;
}

select:hover,
input:not([type="checkbox"]):not([type="radio"]):hover,
textarea:hover {
    border-color: #afc1b5;
    background-color: #fcfefc;
}

select:focus,
input:not([type="checkbox"]):not([type="radio"]):focus,
textarea:focus {
    border-color: #77bd37;
    box-shadow: 0 0 0 4px rgba(160, 229, 69, .16);
}

select:disabled,
input:disabled,
textarea:disabled {
    color: #8c9892;
    background-color: #f3f6f4;
    cursor: not-allowed;
}

select option {
    color: #233c32;
    background: #fff;
}

input[type="checkbox"],
input[type="radio"] {
    padding: 0;
    accent-color: #79bd35;
}

.form-card-title {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
}

.form-card-title > span {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 11px;
    color: #315d47;
    background: #eaf8db;
}

.form-card-title h2,
.form-card-title p {
    margin: 0;
}

.form-card-title p {
    margin-top: 4px;
    color: var(--muted);
    font-size: .75rem;
    line-height: 1.45;
}

.warehouse-overview {
    grid-template-columns: minmax(0, 1.65fr) minmax(310px, .72fr);
    align-items: start;
}

.warehouse-create-card,
.location-create-card {
    padding: 20px;
}

.warehouse-icon {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 13px;
    color: #285a42;
    background: linear-gradient(145deg, #e6f8ce, #d7f1b3);
    font-size: 1rem;
}

.warehouse-card-body {
    min-width: 0;
}

.warehouse-card-body > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.warehouse-card-body .state-badge {
    padding: 4px 7px;
    font-size: .6rem;
}

.warehouse-card-actions {
    display: grid;
    min-width: 145px;
    gap: 8px;
    justify-items: end;
}

.warehouse-card-actions strong {
    color: #557067;
    font-size: .7rem;
}

.warehouse-card-actions a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #356b4b;
    font-size: .72rem;
    font-weight: 800;
    text-decoration: none;
}

.warehouse-card-actions a:hover {
    color: #1f5036;
}

.location-section {
    margin-top: 34px;
    padding-top: 30px;
    border-top: 1px solid #e3ebe5;
}

.location-data-card {
    border-radius: 16px;
}

.location-empty {
    display: grid;
    min-height: 170px;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    padding: 28px;
    background:
        radial-gradient(circle at 0 50%, rgba(168, 237, 69, .08), transparent 19rem),
        #fff;
}

.location-empty > span {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border-radius: 14px;
    color: #3a694f;
    background: #edf8e2;
    font-size: 1.05rem;
}

.location-empty strong {
    display: block;
    color: var(--navy-950);
    font-size: .9rem;
}

.location-empty p {
    max-width: 510px;
    margin: 6px 0 0;
    color: var(--muted);
    font-size: .74rem;
    line-height: 1.5;
}

.location-empty a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 13px;
    border-radius: 10px;
    color: #284b38;
    background: #a8ed45;
    font-size: .7rem;
    font-weight: 850;
    text-decoration: none;
}

.filter-form select {
    min-height: 46px;
}

.filter-form .secondary-button {
    min-height: 46px;
}

@media (max-width: 920px) {
    .warehouse-overview {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 700px) {
    .warehouse-card {
        grid-template-columns: 42px minmax(0, 1fr);
        padding: 15px;
    }

    .warehouse-card-actions {
        grid-column: 2;
        justify-items: start;
        margin-top: 3px;
    }

    .location-empty {
        grid-template-columns: 42px minmax(0, 1fr);
        min-height: 0;
        padding: 22px 18px;
    }

    .location-empty > span {
        width: 42px;
        height: 42px;
    }

    .location-empty a {
        grid-column: 1 / -1;
        justify-content: center;
    }
}

/* Audit kayıtları */
.audit-filters {
    display: grid;
    grid-template-columns: minmax(190px, 1.35fr) repeat(2, minmax(145px, .8fr)) repeat(2, minmax(140px, .7fr)) auto;
    gap: 12px;
    align-items: end;
    margin-top: 24px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e4ebe6;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(23, 61, 47, .04);
}

.audit-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.audit-filter-actions button,
.audit-filter-actions a {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 15px;
    border-radius: 12px;
    font-size: .78rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.audit-filter-actions a {
    color: #51635a;
    background: #f2f5f3;
}

.audit-card {
    margin-top: 14px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e4ebe6;
    border-radius: 17px;
    box-shadow: 0 12px 34px rgba(23, 61, 47, .045);
}

.audit-table-wrap { overflow-x: auto; }

.audit-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.audit-table th,
.audit-table td {
    padding: 14px 15px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #edf1ee;
}

.audit-table th {
    color: #7d8b84;
    background: #fbfcfb;
    font-size: .66rem;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.audit-table th:nth-child(1) { width: 105px; }
.audit-table th:nth-child(2) { width: 145px; }
.audit-table th:nth-child(3) { width: 160px; }
.audit-table th:nth-child(4) { width: 130px; }
.audit-table th:nth-child(5) { width: 155px; }

.audit-table td > strong,
.audit-table td > small {
    display: block;
}

.audit-table td > strong {
    color: #223d32;
    font-size: .78rem;
}

.audit-table td > small {
    margin-top: 4px;
    overflow: hidden;
    color: #829088;
    font-size: .68rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-action {
    display: inline-flex;
    max-width: 100%;
    padding: 5px 8px;
    overflow: hidden;
    color: #2d644a;
    background: #eef8e8;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.audit-detail summary {
    color: #315d47;
    font-size: .74rem;
    font-weight: 750;
    cursor: pointer;
}

.audit-detail > div {
    display: grid;
    gap: 6px;
    margin-top: 10px;
}

.audit-detail span {
    color: #7f8c86;
    font-size: .64rem;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.audit-detail pre {
    max-height: 190px;
    margin: 0;
    padding: 10px;
    overflow: auto;
    color: #29483c;
    background: #f5f8f5;
    border-radius: 9px;
    font: 600 .68rem/1.55 Consolas, monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.audit-detail small {
    color: #8a9690;
    font-size: .64rem;
}

.audit-empty {
    padding: 46px !important;
    text-align: center !important;
}

.audit-empty i,
.audit-empty strong,
.audit-empty span {
    display: block;
}

.audit-empty i {
    margin-bottom: 10px;
    color: #83d334;
    font-size: 1.5rem;
}

.audit-empty span {
    margin-top: 4px;
    color: #7d8983;
    font-size: .75rem;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 13px 16px;
    color: #728078;
    font-size: .74rem;
}

.pagination a {
    padding: 8px 11px;
    color: #315d47;
    background: #eef8e8;
    border-radius: 9px;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 1180px) {
    .audit-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .audit-filters {
        grid-template-columns: minmax(0, 1fr);
        padding: 14px;
    }

    .audit-filter-actions,
    .audit-filter-actions button,
    .audit-filter-actions a {
        width: 100%;
    }

    .audit-table-wrap { overflow: visible; }

    .audit-table,
    .audit-table tbody {
        display: block;
    }

    .audit-table thead { display: none; }
    .audit-table tbody { padding: 10px; }

    .audit-table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-bottom: 10px;
        padding: 13px;
        border: 1px solid #e5ece7;
        border-radius: 14px;
        box-shadow: 0 8px 24px rgba(23, 61, 47, .035);
    }

    .audit-table tr:last-child { margin-bottom: 0; }

    .audit-table td {
        display: grid;
        gap: 3px;
        padding: 8px;
        border: 0;
    }

    .audit-table td::before {
        content: attr(data-label);
        color: #91a098;
        font-size: .61rem;
        font-weight: 850;
        letter-spacing: .06em;
        text-transform: uppercase;
    }

    .audit-table td:nth-child(6),
    .audit-empty {
        grid-column: 1 / -1;
    }

    .audit-empty {
        display: block !important;
        padding: 32px 16px !important;
    }

    .pagination { justify-content: center; }
}
