/* GELKA Portal — minimal V1 stili. Inline style yok (CSP: style-src 'self'). */

:root {
    --portal-bg: #f5f6f8;
    --portal-fg: #1a1f27;
    --portal-brand: #0a5c3e;
    --portal-border: #d7dbe0;
    --portal-error: #b3261e;
    --portal-notice: #0a5c3e;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    background: var(--portal-bg);
    color: var(--portal-fg);
}

.portal-header {
    background: var(--portal-brand);
    padding: 1rem 1.5rem;
}

.portal-header__brand {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.portal-main {
    max-width: 480px;
    margin: 3rem auto;
    padding: 0 1rem;
}

.portal-main--wide { max-width: 960px; }

.auth-card,
.panel-card {
    background: #fff;
    border: 1px solid var(--portal-border);
    border-radius: 8px;
    padding: 2rem;
}

.panel-card { max-width: 720px; }
.panel-card--wide { max-width: 960px; }

form { display: flex; flex-direction: column; gap: 0.75rem; margin-top: 1rem; }

label { font-weight: 600; font-size: 0.9rem; }

input, select, textarea {
    padding: 0.6rem;
    border: 1px solid var(--portal-border);
    border-radius: 4px;
    font-size: 1rem;
}

textarea {
    min-height: 12rem;
    resize: vertical;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.password-field {
    display: grid;
    align-items: center;
}

.password-field input,
.password-visibility-toggle {
    grid-area: 1 / 1;
}

.password-field input {
    width: 100%;
    padding-right: 3rem;
}

.password-visibility-toggle {
    position: relative;
    justify-self: end;
    display: inline-grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0 0.3rem 0 0;
    padding: 0.4rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--portal-fg);
}

.password-visibility-toggle:hover {
    background: var(--portal-bg);
    opacity: 1;
}

.password-visibility-toggle:focus-visible {
    outline: 2px solid var(--portal-brand);
    outline-offset: 2px;
}

.password-visibility-toggle__icon {
    width: 1.25rem;
    height: 1.25rem;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.75;
}

.password-visibility-toggle[aria-pressed="true"]::after {
    position: absolute;
    width: 1.45rem;
    border-top: 2px solid currentColor;
    content: "";
    transform: rotate(-45deg);
}

button {
    padding: 0.7rem;
    border: none;
    border-radius: 4px;
    background: var(--portal-brand);
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

button:hover { opacity: 0.9; }

.form-error { color: var(--portal-error); font-weight: 600; }
.form-notice { color: var(--portal-notice); font-weight: 600; }
.hint { font-size: 0.85rem; color: #5a6472; }

.data-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.data-table th, .data-table td {
    text-align: left;
    padding: 0.5rem;
    border-bottom: 1px solid var(--portal-border);
}

.panel-admin-nav,
.panel-customer-nav,
.panel-dealer-nav { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0; }
.panel-admin-nav a,
.panel-customer-nav a,
.panel-dealer-nav a,
.invoice-actions a,
.portfolio-filters a,
.pagination a { color: var(--portal-brand); }

.invoice-card, .dealer-card {
    background: #fff;
    border: 1px solid var(--portal-border);
    border-radius: 8px;
    padding: 2rem;
}

.invoice-summary, .dealer-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.invoice-summary dt, .dealer-summary dt { color: #5a6472; font-size: 0.85rem; }
.invoice-summary dd, .dealer-summary dd { margin: 0.25rem 0 0; font-weight: 600; }
.invoice-actions, .pagination { display: flex; gap: 1rem; margin-top: 1rem; }
.portfolio-filters { display: flex; gap: 1rem; margin: 1rem 0; }
.earning-filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    align-items: end;
}
.earning-filters label { display: grid; gap: 0.35rem; }
.table-wrapper { overflow-x: auto; }
.import-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
}
.import-summary div {
    padding: 0.75rem;
    border: 1px solid var(--portal-border);
    border-radius: 4px;
}
.import-summary dt { color: #5a6472; font-size: 0.85rem; }
.import-summary dd { margin: 0.25rem 0 0; font-size: 1.25rem; font-weight: 600; }
.import-result {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--portal-border);
    border-radius: 4px;
}
.import-result dt { color: #5a6472; font-size: 0.85rem; }
.import-result dd { margin: 0.25rem 0 0; overflow-wrap: anywhere; font-weight: 600; }
.operations-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    align-items: end;
}
.operations-search-form { display: flex; gap: 0.75rem; align-items: end; margin-bottom: 1rem; }
.operations-search-form label { display: grid; gap: 0.35rem; flex: 1 1 280px; max-width: 520px; }
.operations-form label,
.settlement-invoice-form { display: grid; gap: 0.35rem; }
.operation-actions,
.settlement-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: end; }
.operation-preview {
    margin: 1.5rem 0;
    padding: 1rem;
    border: 2px solid var(--portal-brand);
    border-radius: 8px;
    background: #fff;
}
.operation-disclosure {
    margin: 1rem 0 1.5rem;
    padding: 0.9rem 1rem;
    border: 1px solid #cbd5df;
    border-radius: 8px;
    background: #f8fafc;
}
.operation-disclosure summary { cursor: pointer; font-weight: 700; color: var(--portal-brand); }
.inline-form { margin: 0; min-width: 100px; }
.inline-form button { white-space: nowrap; }
.settlement-invoice-form,
.settlement-paid-form { min-width: 230px; }
.settlement-table { min-width: 1150px; }

.portal-footer {
    text-align: center;
    padding: 1.5rem;
    font-size: 0.8rem;
    color: #5a6472;
}
