/* =====================================================================
   SHRUK Elbasan – stili i përbashkët i aplikacionit
   Ngjyrat e markës janë në :root; ndrysho vetëm këtu për të ndryshuar temën.
   ===================================================================== */
:root {
    --brand: #0b5c8f;          /* blu uji */
    --brand-dark: #08466d;
    --brand-light: #e7f2f9;
    --accent: #12a4b8;         /* bruz */
    --ok: #198754;
    --warn: #c77700;
    --ink: #1d2a35;
    --muted: #6b7a88;
    --bg: #f4f7fa;
    --card: #ffffff;
    --line: #e2e8ee;
    --radius: 12px;
    --shadow: 0 2px 10px rgba(16, 42, 67, .06);
    --shadow-hover: 0 8px 24px rgba(16, 42, 67, .12);

    --bs-primary: var(--brand);
    --bs-link-color: var(--brand);
    --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html { font-size: 15px; }
@media (min-width: 992px) { html { font-size: 16px; } }

body {
    background: var(--bg);
    color: var(--ink);
    font-family: var(--bs-body-font-family);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

main.flex-fill { flex: 1 0 auto; }
a { color: var(--brand); }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { font-weight: 700; letter-spacing: -.01em; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
hr.solid, hr.dashed, hr.dotted, hr.rounded { border: 0; border-top: 1px solid var(--line); opacity: 1; margin: .75rem 0 1.25rem; }

.skip-link { position: absolute; left: 1rem; top: .5rem; z-index: 2000; background: #fff; padding: .5rem 1rem; border-radius: 8px; }

/* ---------- Header ---------- */
.site-header {
    background: linear-gradient(90deg, var(--brand-dark), var(--brand));
    box-shadow: 0 2px 12px rgba(0, 0, 0, .12);
    position: sticky; top: 0; z-index: 1030;
}
.site-header .navbar-brand img { background: #fff; border-radius: 8px; padding: 3px 8px; }
.site-header .nav-link { color: rgba(255, 255, 255, .88) !important; font-weight: 500; border-radius: 8px; padding: .5rem .75rem !important; }
.site-header .nav-link:hover, .site-header .nav-link:focus { color: #fff !important; background: rgba(255, 255, 255, .12); }
.site-header .navbar-toggler { border-color: rgba(255, 255, 255, .5); }
.site-header .navbar-toggler-icon { filter: invert(1); }
.site-header .dropdown-menu { border: 0; border-radius: var(--radius); padding: .5rem; }
.site-header .dropdown-item { border-radius: 8px; padding: .45rem .75rem; }
.site-header .dropdown-item i { color: var(--brand); width: 1.25rem; display: inline-block; }
.update-pill { color: #fff; background: rgba(255, 255, 255, .14); border-radius: 999px; padding: .3rem .8rem; font-size: .8rem; white-space: nowrap; }

/* ---------- Footer ---------- */
.site-footer { background: #fff; border-top: 1px solid var(--line); padding: 1.25rem 0; margin-top: 2rem; font-size: .9rem; color: var(--muted); }
.site-footer .notice { background: #fff8e6; border: 1px solid #f3dfa6; border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; color: #5c4a12; }
.site-footer .notice summary { cursor: pointer; list-style: none; }
.site-footer .notice summary::-webkit-details-marker { display: none; }
.site-footer .notice summary i { color: var(--warn); }
.site-footer .notice p { margin: .75rem 0 0; line-height: 1.6; text-align: justify; }
.footer-bottom { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }

/* ---------- Butona ---------- */
.btn { border-radius: 10px; font-weight: 500; }
.btn-primary, .btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover, .btn-brand:hover, .btn-brand:focus { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.btn-outline-brand { color: var(--brand); border-color: var(--brand); background: transparent; }
.btn-outline-brand:hover { background: var(--brand); color: #fff; }
.btn i + * , .btn i { vertical-align: -1px; }

/* ---------- Karta, formularë ---------- */
.card { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card); }
.form-control, .form-select { border-radius: 10px; border-color: #cfd8e1; padding: .55rem .8rem; }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(18, 164, 184, .18); }
.input-group-text { background: var(--brand-light); border-color: #cfd8e1; color: var(--brand); }
.input-group > :first-child { border-top-left-radius: 10px; border-bottom-left-radius: 10px; }
.input-group > :last-child { border-top-right-radius: 10px; border-bottom-right-radius: 10px; }
.alert { border-radius: var(--radius); border: 0; }

/* ---------- Tabela ---------- */
.table { background: #fff; border-radius: var(--radius); overflow: hidden; font-size: .92rem; }
.table > thead th, .table-primary th { background: var(--brand-light) !important; color: var(--brand-dark); font-weight: 600; border-color: var(--line); white-space: nowrap; }
.table > tbody tr { transition: background-color .15s; }
.table > tbody tr:hover { background: #f1f8fc; }
.selected-row, .selected-row > td { background: #dceefa !important; }
.dataTables_wrapper .dataTables_filter input { border: 1px solid #cfd8e1; border-radius: 10px; padding: .35rem .6rem; }
.dataTables_wrapper .dt-buttons .btn { margin-bottom: .5rem; }

/* Tabelat e gjera rrëshqasin horizontalisht brenda faqes (pa zgjeruar gjithë faqen) */
main table.table:not(.mobile-cards) { display: block; max-width: 100%; overflow-x: auto; }
@media (max-width: 991.98px) {
    main table.table:not(.mobile-cards) { white-space: nowrap; }
}

/* Tabelat .mobile-cards bëhen karta në celular (data-label shtohet nga site.js) */
@media (max-width: 767.98px) {
    table.mobile-cards, table.mobile-cards tbody, table.mobile-cards tr, table.mobile-cards td { display: block; width: 100% !important; }
    table.mobile-cards thead, table.mobile-cards colgroup { display: none; }
    table.mobile-cards { border: 0; background: transparent; overflow: visible; }
    table.mobile-cards tr { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: .75rem; padding: .5rem .75rem !important; height: auto !important; transform: none !important; }
    table.mobile-cards td { border: 0 !important; border-bottom: 1px dashed var(--line) !important; padding: .4rem 0 !important; height: auto !important; display: flex; justify-content: space-between; gap: 1rem; text-align: right !important; max-width: none !important; white-space: normal; }
    table.mobile-cards td:last-child { border-bottom: 0 !important; }
    table.mobile-cards td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; flex: 0 0 45%; }
    table.mobile-cards td > .d-flex { justify-content: flex-end !important; }
}

/* ---------- Dashboard i abonentit ---------- */
.dash-hello { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap;
    background: linear-gradient(135deg, #fff, var(--brand-light)); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.5rem; box-shadow: var(--shadow); }
.dash-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.stat { background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: var(--radius); padding: 1rem 1.1rem; height: 100%; box-shadow: var(--shadow); }
.stat-ok { border-left-color: var(--ok); }
.stat-warn { border-left-color: var(--warn); }
.stat-label { color: var(--muted); font-size: .85rem; font-weight: 500; }
.stat-label i { color: var(--brand); }
.stat-value { font-size: 1.45rem; font-weight: 700; margin-top: .2rem; }
.stat-value small { font-size: .75rem; color: var(--muted); font-weight: 500; }
.stat-sub { color: var(--muted); font-size: .8rem; }

/* ---------- Ndjekja e ankesës (hapat) ---------- */
.stepper { display: flex; gap: .25rem; align-items: flex-start; min-width: 190px; }
.stepper .step { flex: 1; text-align: center; color: #b3bec8; font-size: .72rem; position: relative; }
.stepper .step i { display: inline-flex; width: 28px; height: 28px; border-radius: 50%; align-items: center; justify-content: center; background: #eef2f5; font-size: .85rem; }
.stepper .step em { display: block; font-style: normal; margin-top: .15rem; }
.stepper .step.done { color: var(--ok); }
.stepper .step.done i { background: var(--ok); color: #fff; }

.empty-state { text-align: center; background: #fff; border: 1px dashed #cfd8e1; border-radius: var(--radius); padding: 2.5rem 1rem; color: var(--muted); }
.empty-state i { font-size: 2.5rem; color: var(--brand); }

/* ---------- Login ---------- */
.auth-wrap { min-height: 65vh; display: flex; align-items: center; justify-content: center; padding: 1rem 0; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 16px; box-shadow: var(--shadow-hover); padding: 2rem; border-top: 5px solid var(--brand); }
.auth-head { text-align: center; margin-bottom: 1.5rem; }
.auth-logo { height: 56px; margin-bottom: .75rem; }
.auth-role { font-size: 1.25rem; font-weight: 700; color: var(--brand-dark); }
.auth-foot { margin-top: 1.25rem; text-align: center; font-size: .8rem; color: var(--muted); }

/* ---------- Njoftime (toast) ---------- */
#toast-area { position: fixed; right: 1rem; bottom: 1rem; z-index: 3000; display: flex; flex-direction: column; gap: .5rem; max-width: min(380px, calc(100vw - 2rem)); }
.toast-msg { background: var(--ink); color: #fff; border-radius: 10px; padding: .75rem 1rem; box-shadow: var(--shadow-hover); display: flex; gap: .6rem; align-items: flex-start; animation: toast-in .2s ease-out; }
.toast-msg.ok { background: var(--ok); }
.toast-msg.err { background: #b02a37; }
.toast-msg.warn { background: var(--warn); }
.toast-msg button { margin-left: auto; background: none; border: 0; color: inherit; opacity: .8; font-size: 1.1rem; line-height: 1; }
@keyframes toast-in { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Faqet e vjetra me imazhe ikonash: madhësi uniforme */
#img_logo { object-fit: contain; }
