:root {
    --bg: #050505;
    --panel: rgba(15, 15, 15, 0.88);
    --gold: #d4af37;
    --gold-soft: #f4de8a;
    --text: #f7f1df;
    --muted: #c4b27a;
    --line: rgba(212, 175, 55, 0.28);
}

* { box-sizing: border-box; }

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

body {
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
}

a { color: inherit; }

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-wrap {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-brand-logo {
    display: block;
    width: 75%;
    max-width: 100%;
    height: auto;
    margin: 0 auto 24px;
    filter: drop-shadow(0 10px 28px rgba(212, 175, 55, 0.2));
}

.login-card,
.home-card {
    width: min(520px, 100%);
    background: linear-gradient(180deg, rgba(24, 24, 24, 0.96), rgba(9, 9, 9, 0.96));
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    padding: 36px;
}

.panel-card {
    width: min(1120px, 100%);
    background: linear-gradient(180deg, rgba(24, 24, 24, 0.96), rgba(9, 9, 9, 0.96));
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
    padding: 28px;
}

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

.panel-header h1 {
    margin: 0;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.panel-header p {
    margin: 8px 0 0;
    color: var(--muted);
}

.clients-page {
    width: min(1240px, 100%);
}

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

.clients-table {
    width: 100%;
    border-collapse: collapse;
}

.clients-table th,
.clients-table td {
    padding: 14px 12px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.14);
    text-align: left;
}

.clients-table th {
    color: var(--gold-soft);
    font-size: 0.92rem;
}

.row-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.inline-form {
    display: inline;
}

.link-danger {
    border: 0;
    background: transparent;
    color: #ffb8a8;
    cursor: pointer;
    padding: 0;
    font: inherit;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(244, 222, 138, 0.22);
}

.status-on {
    color: var(--gold-soft);
    background: rgba(212, 175, 55, 0.12);
}

.status-off {
    color: #ffb8a8;
    background: rgba(255, 184, 168, 0.08);
}

.client-form-card {
    width: min(760px, 100%);
}

.client-form {
    margin-top: 12px;
}

.client-flag-row {
    margin-top: 4px;
}

.login-logo {
    display: grid;
    justify-items: center;
    gap: 8px;
    margin-bottom: 28px;
}

.roofline {
    width: 140px;
    height: 72px;
    border-radius: 0 0 18px 18px;
    background: linear-gradient(135deg, var(--gold-soft), var(--gold) 55%, #8b6508);
    clip-path: polygon(0 100%, 50% 0, 100% 100%);
    position: relative;
    box-shadow: 0 0 24px rgba(212, 175, 55, 0.35);
}

.logo-title,
.home-card h1,
.login-card h1 {
    margin: 0;
    text-align: center;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.logo-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gold-soft);
}

.logo-subtitle {
    font-size: 1rem;
    letter-spacing: 0.22em;
    color: var(--muted);
    text-transform: uppercase;
}

.login-copy,
.home-card p {
    text-align: center;
    color: var(--muted);
    line-height: 1.5;
}

.validation,
.field-error {
    color: #ffb8a8;
    font-size: 0.95rem;
}

.login-form {
    display: grid;
    gap: 10px;
    margin-top: 20px;
}

.login-form label {
    font-size: 0.92rem;
    color: var(--gold-soft);
}

.login-form input[type="email"],
.login-form input[type="password"],
.login-form input[type="text"] {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    outline: none;
}

.login-form input:focus {
    border-color: rgba(244, 222, 138, 0.7);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary {
    background: transparent;
    color: var(--gold-soft);
    border: 1px solid rgba(244, 222, 138, 0.35);
}

.btn-table-edit {
    padding: 9px 14px;
    border: 1px solid rgba(244, 222, 138, 0.55);
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.14), rgba(212, 175, 55, 0.06));
    color: var(--gold-soft);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.78rem;
}

.btn-table-edit:hover {
    border-color: rgba(244, 222, 138, 0.8);
    background: linear-gradient(180deg, rgba(212, 175, 55, 0.22), rgba(212, 175, 55, 0.1));
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
    color: var(--muted);
}

.btn-primary {
    margin-top: 12px;
    background: linear-gradient(135deg, var(--gold-soft), var(--gold));
    color: #111;
    border: 0;
    border-radius: 999px;
    padding: 14px 18px;
    font-weight: 800;
    cursor: pointer;
}

.dev-hint {
    margin-top: 16px;
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
}

.dev-hint span { color: var(--gold-soft); }

.form-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.message-box {
    margin-bottom: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(212, 175, 55, 0.22);
    background: rgba(212, 175, 55, 0.08);
    color: var(--gold-soft);
}

.home-card {
    text-align: center;
}

.home-badge {
    display: inline-flex;
    margin-bottom: 16px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(212, 175, 55, 0.12);
    color: var(--gold-soft);
    border: 1px solid rgba(212, 175, 55, 0.22);
}

@media (max-width: 640px) {
    .login-card,
    .home-card {
        padding: 24px;
        border-radius: 22px;
    }

    .topbar {
        padding: 18px 18px 6px;
        gap: 12px;
        flex-direction: column;
        align-items: stretch;
    }

    .panel-card {
        padding: 20px;
        border-radius: 22px;
    }

    .panel-header {
        flex-direction: column;
    }

    .brand {
        justify-content: center;
        text-align: center;
    }
}
