:root {
    --background: #070707;
    --panel: #121212;
    --panel-soft: #171717;
    --gold: #d9b95f;
    --gold-light: #f0d98f;
    --border: #4b4127;
    --text: #f4f1e8;
    --muted: #b8b19f;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(circle at top, #201a0c 0, #080808 38%),
        var(--background);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

.card {
    width: min(440px, calc(100% - 32px));
    margin: 10vh auto;
    padding: 46px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    text-align: center;
}

.logo {
    display: grid;
    width: 72px;
    height: 72px;
    margin: 0 auto 25px;
    place-items: center;
    border: 1px solid var(--gold);
    border-radius: 50%;
    color: var(--gold-light);
    font-size: 34px;
    font-weight: 900;
}

.eyebrow {
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
}

h1 {
    margin: 12px 0;
    font-size: clamp(30px, 5vw, 46px);
}

.description,
.welcome p,
.service-card p {
    color: var(--muted);
    line-height: 1.6;
}

.primary-button,
.outline-button {
    display: inline-block;
    border: 1px solid var(--gold);
    border-radius: 9px;
    color: var(--text);
    font-weight: 800;
    text-decoration: none;
}

.primary-button {
    width: 100%;
    margin-top: 24px;
    padding: 15px;
    background: var(--gold);
    color: #080808;
}

.outline-button {
    padding: 11px 17px;
}

footer {
    margin-top: 35px;
    color: var(--muted);
    font-size: 12px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 5%;
    border-bottom: 1px solid var(--border);
    background: #0e0e0e;
}

.topbar strong,
.topbar span {
    display: block;
}

.topbar span {
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
}

.dashboard {
    width: min(1180px, calc(100% - 32px));
    margin: 60px auto;
}

.welcome {
    margin-bottom: 35px;
}

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

.service-card {
    min-height: 230px;
    padding: 30px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--panel-soft);
}

.service-card.active {
    box-shadow: inset 0 3px 0 var(--gold);
}

.status {
    display: inline-block;
    padding: 6px 9px;
    border-radius: 20px;
    background: #26321e;
    color: #b9dda0;
    font-size: 11px;
    font-weight: 800;
}

.status.planned {
    background: #2c2718;
    color: var(--gold-light);
}

dl {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 12px;
    margin-top: 25px;
    text-align: left;
}

dt {
    color: var(--muted);
}

dd {
    margin: 0;
    word-break: break-word;
}

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

    .card {
        padding: 32px 24px;
    }
}

.customer-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 28px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--border);
}

.customer-summary > div {
    padding: 22px;
    background: var(--panel);
}

.customer-summary strong {
    display: block;
    margin-top: 8px;
    color: var(--text);
}

.summary-label {
    color: var(--gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .1em;
}

.service-button {
    display: inline-block;
    margin-top: 18px;
    padding: 11px 18px;
    border: 1px solid var(--gold);
    border-radius: 8px;
    color: var(--gold-light);
    font-weight: 800;
    text-decoration: none;
}

.disabled-link {
    cursor: default;
    opacity: .68;
    pointer-events: none;
}

.service-note {
    display: block;
    margin-top: 11px;
    color: var(--muted);
}

.license-section {
    margin-top: 30px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: var(--panel);
}

.license-section h2 {
    margin-top: 0;
}

.license-table {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
}

.license-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 15px;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
}

.license-row:first-child {
    border-top: 0;
}

.license-header {
    color: var(--gold);
    font-size: 12px;
    font-weight: 800;
}

.mono {
    font-family: Consolas, monospace;
}

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

    .license-row {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 500px) {
    .customer-summary {
        grid-template-columns: 1fr;
    }
}

/* SOFBAC Customer Panel v2 */

a {
    color: inherit;
}

.language-bar {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    width: min(1180px, calc(100% - 32px));
    margin: 24px auto 0;
}

.language-bar a,
.language-switch a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 32px;
    padding: 0 9px;
    border: 1px solid var(--border);
    border-radius: 18px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
}

.language-bar a.active,
.language-switch a.active {
    border-color: var(--gold);
    background: var(--gold);
    color: #090909;
}

.panel-brand strong,
.panel-brand span {
    display: block;
}

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

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

.support-button {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 9px;
    color: var(--gold-light);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.section-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin: 42px 0 20px;
}

.section-heading h2 {
    margin: 7px 0 0;
    font-size: 29px;
}

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

.product-card {
    position: relative;
    min-height: 310px;
    padding: 28px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background:
        linear-gradient(145deg, rgba(217,185,95,.055), transparent 42%),
        var(--panel-soft);
}

.product-card.active {
    border-color: var(--gold);
    box-shadow: inset 0 3px 0 var(--gold);
}

.product-icon {
    display: grid;
    width: 55px;
    height: 55px;
    margin: 24px 0 18px;
    place-items: center;
    border: 1px solid var(--gold);
    border-radius: 15px;
    color: var(--gold-light);
    font-size: 24px;
    font-weight: 900;
}

.product-card h3 {
    margin: 0;
    font-size: 21px;
}

.product-card p {
    min-height: 72px;
    color: var(--muted);
    line-height: 1.55;
}

.service-button.secondary {
    border-color: var(--border);
    color: var(--muted);
}

.notice-card {
    margin-top: 30px;
    padding: 24px 28px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--panel);
}

.notice-card p {
    margin-bottom: 0;
    color: var(--muted);
}

.login-card footer a {
    color: var(--gold-light);
    text-decoration: none;
}

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

    .topbar {
        align-items: flex-start;
    }

    .topbar-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

@media (max-width: 680px) {
    .topbar {
        gap: 18px;
        padding: 16px;
    }

    .topbar-actions {
        gap: 7px;
    }

    .language-switch {
        width: 100%;
        justify-content: flex-end;
    }

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

    .product-card {
        min-height: 0;
    }

    .product-card p {
        min-height: 0;
    }

    .dashboard {
        margin-top: 38px;
    }
}

/* SOFBAC Customer Panel — finalny układ i ikony 2026-07-31 */

@media (min-width: 1181px) {
    .services-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.product-icon {
    width: 68px;
    height: 68px;
    margin: 22px 0 18px;
    padding: 6px;
    overflow: hidden;
    border: 0;
    border-radius: 14px;
    background: transparent;
}

.product-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@media (min-width: 681px) and (max-width: 1180px) {
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

/* SOFBAC Mail Backup */

.mail-device-card {
    margin-top: 24px;
    padding: 28px;
    border: 1px solid rgba(209, 177, 102, 0.26);
    border-radius: 20px;
    background: rgba(17, 17, 17, 0.92);
}

.mail-device-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}

.mail-device-header h2 {
    margin: 4px 0 0;
}

.backup-version {
    margin-top: 14px;
    border: 1px solid rgba(209, 177, 102, 0.18);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.025);
}

.backup-version summary {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 19px;
    cursor: pointer;
}

.backup-files {
    padding: 0 18px 18px;
}

.backup-file-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 18px;
    padding: 15px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.backup-file-row small {
    display: block;
    margin-top: 4px;
    opacity: 0.65;
    overflow-wrap: anywhere;
}

.backup-file-row button:disabled {
    cursor: not-allowed;
    opacity: 0.48;
}

.mail-assignment-form {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
    gap: 18px;
    margin-top: 20px;
}

.mail-assignment-form label {
    display: grid;
    gap: 8px;
    font-size: 0.9rem;
}

.mail-assignment-form input {
    min-height: 46px;
    padding: 10px 13px;
    border: 1px solid rgba(209, 177, 102, 0.28);
    border-radius: 10px;
    background: #111;
    color: #fff;
}

@media (max-width: 820px) {
    .backup-file-row,
    .mail-assignment-form {
        grid-template-columns: 1fr;
    }

    .mail-device-header {
        flex-direction: column;
    }
}

.mail-file-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.mail-file-actions form {
    margin: 0;
}

.mail-file-actions .service-button {
    white-space: nowrap;
}

@media (max-width: 820px) {
    .mail-file-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .mail-file-actions .service-button {
        display: block;
        width: 100%;
        text-align: center;
    }
}


/* === SOFBAC Mail Backup buttons === */
.mail-action-button,
.restore-request-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.65);
    background: rgba(20, 20, 20, 0.92);
    color: #d8b45a;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.18s ease;
}

.mail-action-button:hover,
.restore-request-button:hover {
    background: rgba(36, 36, 36, 0.98);
    border-color: #d8b45a;
    color: #f0cf76;
}

.restore-request-button:disabled,
.restore-request-button[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    background: rgba(20, 20, 20, 0.70);
    color: #b99a49;
}

.mail-action-row {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* SOFBAC Mail Backup — final dark action buttons */

.mail-file-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.mail-file-actions form {
    margin: 0;
}

.mail-file-actions .mail-action-button,
.mail-file-actions .restore-request-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin: 0;
    padding: 0 18px;
    border: 1px solid rgba(209, 177, 102, 0.62);
    border-radius: 10px;
    background: #171717 !important;
    color: #d8bc79 !important;
    font: inherit;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.mail-file-actions .mail-action-button:hover,
.mail-file-actions .restore-request-button:hover {
    border-color: #e0bd59;
    background: #242424 !important;
    color: #f0cf76 !important;
}

.mail-file-actions .mail-action-button:focus,
.mail-file-actions .restore-request-button:focus {
    outline: 2px solid rgba(224, 189, 89, 0.32);
    outline-offset: 2px;
}

@media (max-width: 820px) {
    .mail-file-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .mail-file-actions .mail-action-button,
    .mail-file-actions .restore-request-button {
        width: 100%;
    }
}

/* SOFBAC Panel — Majerowicz brand mark */

.panel-brand {
    display: grid;
    grid-template-columns: 42px auto;
    grid-template-rows: auto auto;
    align-items: center;
    column-gap: 12px;
}

.panel-brand-mark {
    grid-row: 1 / 3;
    width: 42px;
    height: 42px;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.45));
}

.panel-brand strong,
.panel-brand span {
    min-width: 0;
}

@media (max-width: 700px) {
    .panel-brand {
        grid-template-columns: 34px auto;
        column-gap: 9px;
    }

    .panel-brand-mark {
        width: 34px;
        height: 34px;
    }
}
