:root {
    --text-primary: #1f1f1f;
    --text-secondary: #666b71;
    --border: #e6e6e6;
    --brand: #ff7a1a;
    --brand-soft: #fff4eb;
    --brand-pressed: #e56910;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Google Sans Text", "Roboto", "Segoe UI", sans-serif;
    color: var(--text-primary);
    background:
        linear-gradient(180deg, rgba(21, 25, 35, 0.2), rgba(21, 25, 35, 0.5)),
        radial-gradient(circle at top right, #ffb47f 0, #ff8b35 30%, #f97316 60%, #ea580c 100%);
    min-height: 100vh;
}

.screen {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
}

.login-card {
    width: min(100%, 420px);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 20px 40px rgba(16, 24, 40, 0.18);
    padding: 20px;
}

.login-card-header {
    margin-bottom: 18px;
}

.login-icon {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 30px;
    color: var(--brand);
    background: var(--brand-soft);
    margin-bottom: 10px;
}

.login-card h1 {
    font-size: 1.4rem;
    margin-bottom: 4px;
}

.login-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.alert {
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.86rem;
    margin-bottom: 14px;
}

.alert-error {
    color: #b42318;
    border: 1px solid #fda29b;
    background: #ffefef;
}

.alert-success {
    color: #157347;
    border: 1px solid #86efac;
    background: #ecfdf3;
}

.label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: #3d4046;
}

.login-form .label:not(:first-of-type) {
    margin-top: 10px;
}

.input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}

.input-icon {
    color: #9398a3;
    font-size: 20px;
    margin-left: 12px;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 1rem;
    color: var(--text-primary);
    padding: 13px 12px;
    font-family: inherit;
}

.password-wrap input[type="password"],
.password-wrap input[type="text"] {
    padding-right: 0;
}

.toggle-btn {
    width: 46px;
    height: 46px;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: grid;
    place-items: center;
    color: #6b7280;
}

.primary-btn {
    width: 100%;
    border: 0;
    border-radius: 14px;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    padding: 13px;
    cursor: pointer;
    margin-top: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary-btn:active {
    background: var(--brand-pressed);
}

.dashboard-body {
    background: #f5f7fb;
}

.dashboard-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 260px 1fr;
}

.sidebar {
    background: #101828;
    color: #fff;
    padding: 20px 14px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-brand .material-symbols-rounded {
    color: #ffbe8d;
    font-size: 30px;
}

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

.sidebar-brand p {
    color: #bac2ce;
    font-size: 0.8rem;
}

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

.sidebar-link {
    color: #d0d5dd;
    text-decoration: none;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

.sidebar-link.active,
.sidebar-link:hover {
    color: #fff;
    background: rgba(255, 122, 26, 0.22);
}

.sidebar-logout {
    margin-top: auto;
    text-decoration: none;
    color: #fecaca;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    background: transparent;
    border: 0;
    width: 100%;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.18);
}

.dashboard-content {
    padding: 22px;
    min-width: 0;
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.content-kicker {
    color: #667085;
    font-size: 0.84rem;
}

.content-header h1 {
    font-size: 1.6rem;
}

.content-action {
    width: auto;
    margin-top: 0;
    padding-inline: 18px;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 14px;
}

.stats-cards .stat-card {
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 7px 18px rgba(18, 28, 45, 0.08);
    padding: 14px;
}

.stats-cards .stat-card p {
    color: #667085;
    font-size: 0.84rem;
}

.stats-cards .stat-card strong {
    font-size: 1.4rem;
    display: block;
    margin: 6px 0 4px;
}

.stats-cards .stat-card small {
    color: #98a2b3;
}

.content-panel {
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 7px 18px rgba(18, 28, 45, 0.08);
    padding: 14px;
    min-width: 0;
}

.panel-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.panel-title-row h2 {
    font-size: 1.05rem;
}

.panel-title-row a {
    color: var(--brand);
    text-decoration: none;
    font-size: 0.86rem;
}

.activity-list {
    list-style: none;
    display: grid;
    gap: 10px;
}

.activity-list li {
    border: 1px solid #eaecf0;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #344054;
    font-size: 0.9rem;
}

.activity-list .material-symbols-rounded {
    color: var(--brand);
}

.settings-card-content {
    border: 1px solid #eaecf0;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fcfcfd;
}

.settings-card-text {
    color: #344054;
    font-size: 0.9rem;
    line-height: 1.6;
    white-space: pre-line;
}

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

    .sidebar {
        padding-bottom: 12px;
    }

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

    .sidebar-logout {
        margin-top: 4px;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }
}

.form-grid {
    display: grid;
    gap: 8px;
}

.field-label {
    font-size: 0.88rem;
    color: #344054;
}

input.text-input,
textarea.text-input,
select.text-input {
    width: 100%;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.95rem;
    font-family: inherit;
    color: #101828;
    background: #fff;
}

.text-area {
    min-height: 90px;
    resize: vertical;
}

.content-action-inline {
    width: auto;
    margin-top: 6px;
    justify-self: start;
    padding-inline: 16px;
}

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

.pemilik-table-hint {
    margin: 0 0 12px;
    font-size: 0.86rem;
    color: #475467;
    line-height: 1.45;
}

.pemilik-table-wrap .data-table {
    min-width: 1180px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
}

.data-table th,
.data-table td {
    text-align: left;
    padding: 10px 8px;
    border-bottom: 1px solid #eaecf0;
    font-size: 0.9rem;
}

.data-table th {
    color: #667085;
    font-weight: 600;
}

.chip {
    display: inline-flex;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 0.76rem;
    font-weight: 600;
}

.chip-ok {
    background: #ecfdf3;
    color: #027a48;
}

.chip-warn {
    background: #fff6ed;
    color: #b54708;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.table-action-btn {
    border: 0;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 10px;
    cursor: pointer;
}

.table-action-btn.edit {
    background: #eff8ff;
    color: #175cd3;
}

.table-action-btn.delete {
    background: #fef3f2;
    color: #b42318;
}

.global-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 200;
    overflow-y: auto;
}

.global-modal-backdrop.active {
    display: flex;
}

.global-modal {
    width: min(100%, 460px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(16, 24, 40, 0.24);
    padding: 14px;
    max-height: calc(100dvh - 32px);
    overflow-y: auto;
}

.global-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.global-modal-head h2 {
    font-size: 1.1rem;
}

.modal-icon-btn {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    background: #f2f4f7;
    color: #344054;
    cursor: pointer;
    display: inline-grid;
    place-items: center;
}

.global-success-label {
    display: none;
    margin-bottom: 10px;
    border-radius: 10px;
    border: 1px solid #86efac;
    background: #ecfdf3;
    color: #027a48;
    font-size: 0.86rem;
    font-weight: 600;
    padding: 9px 11px;
}

.global-success-label.active {
    display: block;
}

.confirm-modal {
    width: min(100%, 380px);
}

.confirm-text {
    color: #475467;
    font-size: 0.92rem;
    margin-bottom: 14px;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.pemilik-row-selectable {
    cursor: pointer;
}

.pemilik-row-selectable:hover {
    background: #f9fafb;
}

.pemilik-row-selected td {
    background: #eff8ff;
}

.chip-neutral {
    background: #f2f4f7;
    color: #344054;
}

.chip-inactive {
    background: #fef3f2;
    color: #b42318;
}

.pemilik-row-inactive td {
    opacity: 0.72;
}

.invoice-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 190;
    background: rgba(15, 23, 42, 0.4);
    display: none;
}

.invoice-drawer-backdrop.active {
    display: block;
}

.invoice-drawer-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(100%, 480px);
    height: 100%;
    max-height: 100dvh;
    background: #fff;
    box-shadow: -8px 0 32px rgba(16, 24, 40, 0.18);
    padding: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.invoice-drawer-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.invoice-drawer-kicker {
    margin: 0 0 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #667085;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.invoice-drawer-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: #101828;
    line-height: 1.25;
}

.invoice-drawer-subtitle {
    margin: 6px 0 0;
    font-size: 0.86rem;
    color: #475467;
}

.invoice-drawer-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.invoice-drawer-toolbar .table-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.invoice-drawer-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
    border: 1px solid #eaecf0;
    border-radius: 10px;
}

.invoice-drawer-body .data-table {
    min-width: 0;
    font-size: 0.82rem;
}

.invoice-drawer-body .data-table th,
.invoice-drawer-body .data-table td {
    padding: 8px 6px;
    vertical-align: top;
}

.invoice-wa-cell {
    white-space: nowrap;
}

.invoice-wa-cell .table-action-btn {
    padding: 4px 8px;
    font-size: 0.72rem;
}
