/* ===========================================================
   ERP Mobiles — shared chrome
   Dark-first theme matching the erp.tr family (beta, wapi, rdp).
   =========================================================== */

:root {
    --bs-body-bg: #FFFFFF;
    --bs-body-color: #22313F;
    --erp-surface: #FFFFFF;
    --erp-surface-2: #F6F8FA;
    --erp-text: #22313F;
    --erp-text-dim: #6B7785;
    --erp-border: #E5E7EB;
    --erp-brand: #1E5BFF;
}

html.theme-dark {
    --bs-body-bg: #15161A;
    --bs-body-color: #E5E7EB;
    --erp-surface: #1B1D22;
    --erp-surface-2: #20232A;
    --erp-text: #E5E7EB;
    --erp-text-dim: #9AA3AE;
    --erp-border: #2A2E36;
    --erp-brand: #6B8DFF;
    color-scheme: dark;
}
html.theme-light {
    color-scheme: light;
}

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: var(--bs-body-bg);
    color: var(--bs-body-color);
}

main { min-height: calc(100vh - 320px); }

a, .btn-link { color: var(--erp-brand); }

/* Surfaces (cards, panels) re-skin for dark mode */
html.theme-dark .card,
html.theme-dark .bg-white {
    background-color: var(--erp-surface) !important;
    color: var(--erp-text);
}
html.theme-dark .text-muted { color: var(--erp-text-dim) !important; }
html.theme-dark .border-top, html.theme-dark .border-bottom { border-color: var(--erp-border) !important; }
html.theme-dark .form-control,
html.theme-dark .form-select {
    background-color: var(--erp-surface-2);
    color: var(--erp-text);
    border-color: var(--erp-border);
}
html.theme-dark .form-control::placeholder { color: var(--erp-text-dim); }
html.theme-dark .alert-warning {
    background-color: #3a2c12;
    color: #f3d27a;
    border-color: #604a1f;
}
html.theme-dark .table { color: var(--erp-text); }
html.theme-dark .btn-outline-secondary {
    color: var(--erp-text-dim);
    border-color: var(--erp-border);
}

/* ---------- Navbar ---------- */
.erp-navbar {
    background: var(--erp-surface);
    border-bottom: 1px solid var(--erp-border);
    padding: 14px 0;
    position: sticky; top: 0; z-index: 50;
}
.erp-brand {
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--erp-brand) !important;
    text-decoration: none;
    letter-spacing: 0.2px;
}
.erp-navlink {
    color: var(--erp-text-dim);
    text-decoration: none;
    font-size: 0.92rem;
    padding: 4px 10px;
    border-radius: 6px;
}
.erp-navlink:hover { color: var(--erp-text); background: var(--erp-surface-2); }
.erp-lang-label { color: var(--erp-text-dim); font-size: 0.85rem; }
.erp-theme-toggle {
    border: 1px solid var(--erp-border);
    background: var(--erp-surface-2);
    color: var(--erp-text);
    border-radius: 6px;
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    padding: 0;
}
.erp-theme-toggle:hover { border-color: var(--erp-brand); }
.erp-theme-toggle .t-icon { font-size: 1.05rem; line-height: 1; }
html.theme-dark .erp-theme-toggle .t-light { display: none; }
html.theme-light .erp-theme-toggle .t-dark  { display: none; }

/* ---------- "Other apps" rail ---------- */
.erp-otherapps {
    margin: 48px 0 0;
    padding: 32px 0;
    background: var(--erp-surface-2);
    border-top: 1px solid var(--erp-border);
    border-bottom: 1px solid var(--erp-border);
}
.erp-otherapps-title {
    margin: 0 0 4px;
    color: var(--erp-text);
    font-size: 1.15rem;
    font-weight: 700;
}
.erp-otherapps-sub {
    color: var(--erp-text-dim);
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.erp-otherapps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.erp-otherapp {
    display: block;
    padding: 14px 14px 12px;
    background: var(--erp-surface);
    border-radius: 10px;
    border: 1px solid var(--erp-border);
    text-decoration: none;
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.erp-otherapp:hover { transform: translateY(-2px); border-color: var(--erp-brand); }
.erp-otherapp-name { font-weight: 700; font-size: 0.98rem; margin-bottom: 2px; }
.erp-otherapp-tag { color: var(--erp-text-dim); font-size: 0.82rem; line-height: 1.35; }

/* ---------- Footer (mirrors beta.erp.tr — common chrome) ---------- */
.erp-footer {
    background: #0F1013;
    color: #C7CFD8;
    padding: 42px 0 12px;
    margin-top: 56px;
}
html.theme-light .erp-footer { background: #1B1D22; color: #C7CFD8; }
/* 3 columns now: brand+address | quick links | contact (CANLI ÜRÜNLER dropped) */
.erp-footer .footer-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 32px;
    padding-bottom: 28px;
}
@media (max-width: 880px) {
    .erp-footer .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 540px) {
    .erp-footer .footer-grid { grid-template-columns: 1fr; }
}
.erp-footer h5 {
    color: #FFFFFF;
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 16px;
}
.erp-footer ul { list-style: none; padding: 0; margin: 0; }
.erp-footer li { margin: 10px 0; }
.erp-footer a {
    color: #C7CFD8;
    text-decoration: none;
    font-size: 0.92rem;
}
.erp-footer a:hover { color: #FFFFFF; }
.erp-footer .footer-brand-col .footer-brand-badge {
    display: inline-block;
    background: #FFFFFF;
    color: #1E5BFF;
    font-weight: 900;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 8px;
    margin-bottom: 18px;
    font-size: 1.15rem;
    font-style: italic;
}
.erp-footer .footer-company-name {
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0 0 6px;
    line-height: 1.4;
}
.erp-footer .footer-tag {
    color: #9AA3AE;
    font-size: 0.88rem;
    margin: 6px 0;
    line-height: 1.55;
}
.erp-footer .footer-address {
    margin-top: 14px;
    color: #9AA3AE;
}
/* "ERP Ürün Ailesi" — heading + 3 rows of 5 (15 products total). */
.erp-footer .footer-family-section {
    border-top: 1px solid #2A2E36;
    padding: 24px 0 18px;
    text-align: center;
}
.erp-footer .footer-family-title {
    color: #FFFFFF;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.4px;
    margin: 0 0 18px;
}
.erp-footer .footer-family-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px 14px;
}
@media (max-width: 880px) {
    .erp-footer .footer-family-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 540px) {
    .erp-footer .footer-family-grid { grid-template-columns: repeat(2, 1fr); }
}
.erp-footer .footer-family-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #2A2E36;
    color: #C7CFD8;
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.erp-footer .footer-family-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--erp-brand);
    color: #FFFFFF;
}
.erp-footer .footer-family-icon {
    font-size: 1.05rem;
    line-height: 1;
    flex: 0 0 auto;
}
.erp-footer .footer-family-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.erp-footer .footer-bottom {
    padding-top: 12px;
    border-top: 1px solid #2A2E36;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    color: #6B7785;
    font-size: 0.82rem;
}

/* ---------- App "Details" section ---------- */
.erp-details {
    margin: 40px 0 0;
    padding: 32px 0;
    background: var(--erp-surface-2);
    border-top: 1px solid var(--erp-border);
}
.erp-details-kicker {
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-size: 0.78rem;
    font-weight: 700;
}
.erp-details-title {
    color: var(--erp-text);
    margin: 4px 0 6px;
    font-weight: 700;
    font-size: 1.55rem;
}
.erp-details-sub {
    color: var(--erp-text-dim);
    margin-bottom: 20px;
    font-size: 0.95rem;
}
.erp-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}
@media (max-width: 760px) { .erp-details-grid { grid-template-columns: 1fr; } }
.erp-details-card {
    background: var(--erp-surface);
    border-radius: 12px;
    border: 1px solid var(--erp-border);
    padding: 22px 22px 20px;
}
.erp-details-card h3 {
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: 0.2px;
}
.erp-details-card .erp-details-p {
    color: var(--erp-text-dim);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
}
.erp-feature-list { list-style: none; padding: 0; margin: 0; }
.erp-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--erp-text);
    font-size: 0.95rem;
    line-height: 1.55;
    margin: 9px 0;
}
.erp-feature-bullet {
    display: inline-block;
    width: 8px; height: 8px;
    border-radius: 50%;
    margin-top: 7px;
    flex: 0 0 8px;
}

/* ---------- Misc legacy ---------- */
.btn-primary {
    color: #fff;
    background-color: var(--erp-brand);
    border-color: var(--erp-brand);
}
.btn-outline-primary {
    color: var(--erp-brand);
    border-color: var(--erp-brand);
}
.btn-outline-primary:hover { background-color: var(--erp-brand); color: #fff; }

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem rgba(255,255,255,0.05), 0 0 0 0.25rem rgba(107,141,255,0.4);
}

.content { padding-top: 1.1rem; }
h1:focus { outline: none; }
.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem;
    color: white;
}
.blazor-error-boundary::after { content: "An error has occurred."; }

.darker-border-checkbox.form-check-input { border-color: #929292; }
