:root {
    --color-background: #f6f6f6;
    --color-surface: #ffffff;
    --color-strong: #101010;
    --color-text: #1f1f1f;
    --color-muted: #6d6d6d;
    --color-line: #dedede;
    --color-soft: #eeeeee;
    --shadow-soft: 0 18px 45px rgba(0, 0, 0, 0.08);
    --radius: 8px;
    --sidebar-width: 272px;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--color-background);
    color: var(--color-text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.5;
}

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

button,
input {
    font: inherit;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding: 28px 20px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-line);
}

.brand {
    display: grid;
    gap: 12px;
    color: var(--color-strong);
    font-weight: 700;
}

.brand img,
.login-logo {
    display: block;
    max-width: 180px;
    height: auto;
}

.brand span {
    line-height: 1.2;
}

.nav-list {
    display: grid;
    gap: 6px;
}

.nav-list a,
.language-switch a {
    min-height: 40px;
    display: flex;
    align-items: center;
    border-radius: var(--radius);
    color: var(--color-muted);
    padding: 9px 12px;
}

.nav-list a.active,
.nav-list a:hover,
.language-switch a.active,
.language-switch a:hover {
    background: var(--color-strong);
    color: #ffffff;
}

.sidebar-footer {
    margin-top: auto;
    display: grid;
    gap: 16px;
}

.language-switch {
    display: flex;
    gap: 6px;
}

.language-switch a {
    min-width: 42px;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.content {
    flex: 1;
    min-width: 0;
    padding: 36px;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
}

.auth-content {
    width: min(100%, 420px);
    display: grid;
    gap: 18px;
}

.auth-language {
    justify-content: flex-end;
}

.login-panel,
.panel {
    background: var(--color-surface);
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
}

.login-panel {
    padding: 32px;
    box-shadow: var(--shadow-soft);
}

.login-heading {
    display: grid;
    gap: 8px;
    margin-bottom: 24px;
}

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

h1,
h2 {
    margin: 0;
    color: var(--color-strong);
    line-height: 1.15;
}

h1 {
    font-size: 30px;
}

h2 {
    font-size: 18px;
}

.page-title-meta {
    margin: 8px 0 0;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.global-search {
    display: block;
    width: min(100%, 360px);
    margin-top: 24px;
}

.disk-overview {
    display: grid;
    grid-template-columns: auto minmax(280px, 430px);
    align-items: flex-start;
    gap: 28px;
    margin-top: 16px;
}

.disk-usage {
    display: flex;
    align-items: center;
    gap: 14px;
}

.disk-chart {
    width: 76px;
    height: 76px;
    flex: 0 0 76px;
    position: relative;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: conic-gradient(var(--color-strong) 0 var(--disk-used), #d9dddf var(--disk-used) 100%);
}

.disk-chart::before {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--color-background);
}

.disk-chart span {
    position: relative;
    color: var(--color-strong);
    font-size: 12px;
    font-weight: 700;
}

.disk-legend {
    display: grid;
    gap: 2px;
    color: var(--color-muted);
    font-size: 12px;
}

.disk-legend strong {
    color: var(--color-strong);
    font-size: 13px;
    font-weight: 600;
}

.disk-legend span,
.disk-legend small {
    display: flex;
    align-items: center;
    gap: 5px;
}

.disk-legend small {
    font-size: 11px;
}

.disk-swatch {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
}

.disk-swatch-used {
    background: var(--color-strong);
}

.disk-swatch-free {
    background: #d9dddf;
    border: 1px solid #c4c9cb;
}

.top-level-usage {
    width: min(100%, 430px);
    display: grid;
    gap: 7px;
    padding-top: 2px;
}

.top-level-usage > strong {
    color: var(--color-strong);
    font-size: 13px;
    font-weight: 600;
}

.top-level-bars {
    display: grid;
    gap: 5px;
}

.top-level-bar-row {
    display: grid;
    grid-template-columns: minmax(90px, 150px) minmax(70px, 1fr) 42px;
    align-items: center;
    gap: 7px;
    min-width: 0;
    color: var(--color-muted);
    font-size: 11px;
}

.top-level-bar-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.top-level-bar-track {
    height: 8px;
    overflow: hidden;
    border-radius: 4px;
    background: #d9dddf;
}

.top-level-bar-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--color-strong);
}

.top-level-bar-percent {
    text-align: right;
    white-space: nowrap;
}

.global-search input {
    width: 100%;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    color: var(--color-text);
    background: #ffffff;
    font-size: 13px;
}

.global-search input:focus {
    border-color: var(--color-strong);
    outline: 3px solid rgba(16, 16, 16, 0.1);
}

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

.field {
    display: grid;
    gap: 7px;
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 700;
}

.field input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    color: var(--color-text);
    background: #ffffff;
}

.field input:focus,
.security-search input:focus {
    border-color: var(--color-strong);
    outline: 3px solid rgba(16, 16, 16, 0.1);
}

.button {
    width: 100%;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 800;
    padding: 9px 14px;
}

.button-primary {
    background: var(--color-strong);
    color: #ffffff;
}

.button-primary:hover {
    background: #2d2d2d;
}

.button-secondary {
    background: #ffffff;
    border-color: var(--color-line);
    color: var(--color-strong);
}

.button-secondary:hover {
    background: var(--color-soft);
}

.button:disabled,
.button:disabled:hover {
    cursor: not-allowed;
    opacity: 0.45;
}

.alert {
    margin-bottom: 18px;
    padding: 12px 14px;
    border: 1px solid #b9b9b9;
    border-radius: var(--radius);
    background: #f1f1f1;
    color: var(--color-strong);
}

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
}

.user-chip {
    display: grid;
    justify-items: end;
    gap: 2px;
    padding: 10px 12px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: var(--color-surface);
    white-space: nowrap;
}

.user-chip span {
    color: var(--color-strong);
    font-weight: 800;
}

.user-chip small {
    color: var(--color-muted);
}

.panel {
    overflow: hidden;
}

.datos-table-panel {
    max-width: none;
}

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

table {
    width: 100%;
    min-width: 740px;
    border-collapse: collapse;
}

th,
td {
    padding: 13px 18px;
    text-align: left;
    border-bottom: 1px solid var(--color-line);
    vertical-align: top;
    font-size: 13px;
    font-weight: 400;
}

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

tbody tr:last-child td {
    border-bottom: 0;
}

.datos-table th:last-child,
.datos-table td:last-child {
    width: 42px;
    text-align: right;
}

.datos-size-cell {
    width: 110px;
    white-space: nowrap;
    color: var(--color-muted);
    text-align: right;
}

.datos-table tbody .datos-item-row td {
    padding-top: 4px;
    padding-bottom: 4px;
    vertical-align: middle;
}

.datos-name-cell {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0;
    max-width: 100%;
}

.datos-name-cell > * + * {
    margin-left: 5px;
}

.datos-name-cell > span:last-child {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.datos-item-row {
    cursor: pointer;
}

.datos-item-row td {
    background: inherit;
}

.datos-row-alt {
    background: #f5f6f7;
}

.datos-item-row:hover,
.datos-item-row:focus-visible {
    background: #f5f7f8;
    outline: none;
}

.datos-row-hint {
    color: var(--color-muted);
    font-size: 18px;
    line-height: 1;
}

.datos-name-cell-child {
    padding-left: 28px;
}

.datos-name-cell-child::before {
    content: "";
    width: 18px;
    height: 1px;
    flex: 0 0 auto;
    background: var(--color-line);
}

.datos-item-icon-wrap {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.datos-item-icon {
    width: 19px;
    height: 19px;
    display: block;
}

.datos-item-icon[hidden],
.datos-item-icon-fallback[hidden] {
    display: none;
}

.datos-item-icon-fallback {
    min-width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--color-line);
    border-radius: 4px;
    background: #ffffff;
    color: var(--color-muted);
    font-size: 9px;
    font-weight: 800;
}

.security-detail-row td {
    padding: 10px 18px 18px;
    background: #ffffff;
}

.security-table-wrap {
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    background: #eef1f2;
}

.security-table {
    min-width: 760px;
    background: #eef1f2;
}

.security-table th,
.security-table td {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 400;
}

.security-table thead th {
    background: #101010;
    color: #ffffff;
    text-transform: none;
    vertical-align: middle;
}

.security-table th:not(:first-child),
.security-table td:not(:first-child) {
    width: 88px;
    text-align: center;
}

.security-search {
    display: block;
    font-weight: 400;
}

.security-search input {
    width: min(100%, 280px);
    min-height: 26px;
    padding: 3px 8px;
    border: 1px solid var(--color-line);
    border-radius: var(--radius);
    color: var(--color-text);
    background: #ffffff;
    font-size: 12px;
    text-transform: none;
}

.identity-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
}

.identity-cell strong {
    display: block;
    color: var(--color-strong);
    overflow-wrap: anywhere;
    font-weight: 400;
}

.identity-cell small {
    display: block;
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 400;
}

.identity-icon {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    fill: var(--color-strong);
}

.permission-check-cell {
    color: var(--color-strong);
}

.permission-check {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #b7babc;
    border-radius: 50%;
    background: #dde0e1;
    color: #62676a;
    font-size: 11px;
    font-weight: 600;
}

.empty-state {
    margin: 0;
    padding: 18px;
    color: var(--color-muted);
}

@media (max-width: 980px) {
    .app-shell {
        display: block;
    }

    .sidebar {
        width: 100%;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--color-line);
    }

    .content {
        padding: 24px;
    }

    .page-header {
        display: grid;
    }

    .user-chip {
        justify-items: start;
        white-space: normal;
    }
}

@media (max-width: 560px) {
    .auth-shell,
    .content {
        padding: 18px;
    }

    .login-panel {
        padding: 24px;
    }

    .sidebar {
        padding: 22px 18px;
    }

    h1 {
        font-size: 26px;
    }

    .disk-overview {
        grid-template-columns: 1fr;
    }

}
