/* ══════════════════════════════════════════════════════════════════════
   Portal theme — προσαρμοσμένο από το brand IT-Experts (it-experts.gr).

   ΣΚΟΠΙΜΑ όλα τα selectors είναι scoped κάτω από .portal-shell, ΟΧΙ global.
   Το admin (/admin/*) χρησιμοποιεί ήδη Bootstrap classes (.btn, .card,
   .table) — αν αυτό το αρχείο όριζε τα ίδια ονόματα global, θα έσπαγε το
   admin UI τη στιγμή που θα φόρτωνε σε οποιαδήποτε σελίδα. Κάθε portal
   σελίδα τυλίγει το περιεχόμενό της σε <div class="portal-shell">.
   ══════════════════════════════════════════════════════════════════════ */

.portal-shell{
    --ink:#0A0E1A; --ink-2:#111827; --panel:#0F1626;
    --cyan:#2DD4BF; --blue:#3B82F6; --slate:#94A3B8; --slate-2:#64748B;
    --white:#F8FAFC; --line:rgba(148,163,184,.14);
    --grad:linear-gradient(120deg,#2DD4BF,#3B82F6);
    --danger:#F87171;

    min-height:100vh;
    background:var(--ink); color:var(--white);
    font-family:'Inter',sans-serif; line-height:1.6;
    -webkit-font-smoothing:antialiased;
}
.portal-shell *{box-sizing:border-box}
.portal-shell h1,.portal-shell h2,.portal-shell h3{
    font-family:'Space Grotesk',sans-serif; letter-spacing:-.02em; line-height:1.1;
}
.portal-shell a{color:var(--cyan); text-decoration:none}

/* ── Topbar (λογότυπο) ─────────────────────────────────────────────── */
.portal-topbar{
    display:flex; align-items:center; gap:10px;
    padding:22px 28px; border-bottom:1px solid var(--line);
}
.portal-topbar .mark{display:block; flex-shrink:0}
.portal-topbar .wordmark{
    font-family:'Space Grotesk',sans-serif; font-weight:700; font-size:1.15rem;
    letter-spacing:-.01em; color:var(--white);
}
.portal-topbar .wordmark span{
    background:var(--grad); -webkit-background-clip:text; background-clip:text; color:transparent;
}
.portal-topbar .spacer{flex:1}
.portal-topbar .who{color:var(--slate); font-size:.88rem}

/* ── Κεντραρισμένη κάρτα (login / change-password) ───────────────────── */
.portal-center{
    display:flex; align-items:center; justify-content:center;
    min-height:calc(100vh - 78px); padding:40px 20px;
}
.portal-card{
    width:100%; max-width:400px;
    background:var(--panel); border:1px solid var(--line); border-radius:16px;
    padding:36px 32px;
}
.portal-card h2{font-size:1.5rem; font-weight:700; margin-bottom:8px}
.portal-card .subtitle{color:var(--slate); font-size:.92rem; margin-bottom:26px}

/* ── Φόρμες ────────────────────────────────────────────────────────── */
.portal-field{margin-bottom:18px}
.portal-field label{
    display:block; font-size:.85rem; color:var(--slate); margin-bottom:7px; font-weight:500;
}
.portal-field .hint{font-size:.78rem; color:var(--slate-2); margin-top:6px}
.portal-shell input{
    width:100%; background:var(--ink); border:1px solid var(--line); border-radius:10px;
    padding:12px 14px; color:var(--white); font-family:inherit; font-size:.95rem;
    transition:border-color .2s;
}
.portal-shell input:focus{outline:none; border-color:var(--cyan)}

/* ── Κουμπιά ───────────────────────────────────────────────────────── */
.portal-btn{
    display:inline-block; width:100%; text-align:center; border:0; cursor:pointer;
    padding:13px 22px; border-radius:10px; font-weight:600; font-size:.95rem;
    background:var(--grad); color:#04121A; transition:transform .2s, box-shadow .2s;
    font-family:inherit;
}
.portal-btn:hover{transform:translateY(-2px); box-shadow:0 12px 30px -10px rgba(45,212,191,.5)}
.portal-btn-outline{
    display:inline-block; padding:8px 16px; border-radius:8px; font-size:.85rem; font-weight:600;
    background:transparent; border:1px solid var(--line); color:var(--white); cursor:pointer;
    font-family:inherit; transition:border-color .2s;
}
.portal-btn-outline:hover{border-color:var(--cyan)}

/* ── Alerts ────────────────────────────────────────────────────────── */
.portal-alert-error{
    background:rgba(248,113,113,.1); border:1px solid rgba(248,113,113,.35);
    color:var(--danger); border-radius:10px; padding:12px 16px; font-size:.88rem;
    margin-bottom:18px;
}

/* ── Dashboard content ─────────────────────────────────────────────── */
.portal-content{max-width:900px; margin:0 auto; padding:40px 28px}
.portal-content h1{font-size:1.9rem; font-weight:700; margin-bottom:24px}
.portal-info-card{
    background:var(--panel); border:1px solid var(--line); border-radius:16px;
    padding:26px 28px; margin-bottom:24px;
}
.portal-info-card h3{font-size:1.15rem; font-weight:600; margin-bottom:6px}
.portal-info-card .meta{color:var(--slate); font-size:.9rem}
.portal-badge{
    display:inline-flex; align-items:center; gap:8px; font-size:.75rem; color:var(--cyan);
    border:1px solid var(--line); padding:5px 12px; border-radius:99px; font-weight:600;
}
.portal-muted{color:var(--slate)}

/* ── Πίνακες (entitlement rows, λίστα συμβολαίων) ─────────────────── */
.portal-shell table{width:100%; border-collapse:collapse; font-size:.9rem}
.portal-shell th{
    text-align:left; color:var(--slate); font-weight:500; font-size:.78rem;
    text-transform:uppercase; letter-spacing:.04em;
    padding:10px 12px; border-bottom:1px solid var(--line);
}
.portal-shell td{padding:10px 12px; border-bottom:1px solid var(--line)}
.portal-shell tr:last-child td{border-bottom:none}
.portal-shell select{
    width:100%; background:var(--ink); border:1px solid var(--line); border-radius:8px;
    padding:8px 10px; color:var(--white); font-family:inherit; font-size:.88rem;
}
.portal-shell select:focus{outline:none; border-color:var(--cyan)}

/* ── Status / discount badges ────────────────────────────────────── */
.portal-status{
    display:inline-block; padding:4px 11px; border-radius:99px; font-size:.75rem; font-weight:600;
}
.portal-status-pending{background:rgba(148,163,184,.15); color:var(--slate)}
.portal-status-review{background:rgba(59,130,246,.15); color:var(--blue)}
.portal-status-approved{background:rgba(45,212,191,.15); color:var(--cyan)}
.portal-discount-badge{
    display:inline-block; background:rgba(45,212,191,.12); color:var(--cyan);
    padding:3px 10px; border-radius:99px; font-size:.78rem; font-weight:600;
}

/* ── Cost breakdown card ─────────────────────────────────────────── */
.portal-cost-row{
    display:flex; justify-content:space-between; padding:8px 0;
    border-bottom:1px solid var(--line); font-size:.92rem;
}
.portal-cost-row:last-child{border-bottom:none}
.portal-cost-row.total{font-weight:700; font-size:1.1rem; padding-top:14px}
.portal-cost-row .label{color:var(--slate)}

/* ── Δευτερεύον κουμπί (π.χ. 'Αφαίρεση γραμμής') ─────────────────── */
.portal-btn-danger-outline{
    background:transparent; border:1px solid rgba(248,113,113,.4); color:var(--danger);
    padding:6px 12px; border-radius:8px; font-size:.82rem; cursor:pointer; font-family:inherit;
}
.portal-btn-danger-outline:hover{background:rgba(248,113,113,.1)}

.portal-btn-secondary{
    display:inline-block; padding:13px 22px; border-radius:10px; font-weight:600; font-size:.95rem;
    background:var(--panel-2, #1e2430); border:1px solid var(--line); color:var(--white);
    cursor:pointer; font-family:inherit; transition:border-color .2s;
}
.portal-btn-secondary:hover{border-color:var(--cyan)}

/* ── Εικονίδιο λήψης (inline, δίπλα σε τίτλο/γραμμή) ─────────────────── */
.portal-icon-download{
    display:inline-flex; align-items:center; justify-content:center;
    width:34px; height:34px; border-radius:50%;
    background:var(--grad); color:#04121A; flex-shrink:0;
    transition:transform .15s, box-shadow .15s; cursor:pointer;
}
.portal-icon-download:hover{transform:translateY(-1px); box-shadow:0 8px 20px -6px rgba(45,212,191,.5)}
.portal-icon-download svg{width:16px; height:16px}

/* ══════════════════════════════════════════════════════════════════
   Floating AI Assistant (Messenger-style bubble)

   ΣΚΟΠΙΜΑ ΚΑΘΕ var() εδώ έχει hardcoded fallback — το widget ζει ΕΞΩ
   από το .portal-shell οποιασδήποτε σελίδας (είναι global, μέσω του
   PortalLayout), άρα ΔΕΝ βλέπει τα CSS custom properties που είναι
   scoped μέσα στο .portal-shell (--white, --grad, κλπ. — σκόπιμα ΟΧΙ
   :root, βλ. σχόλιο στην κορυφή του αρχείου). Χωρίς fallback εδώ, το
   κείμενο γινόταν αόρατο (var() χωρίς οριζόμενη τιμή = 'unset').
   ══════════════════════════════════════════════════════════════════ */
.assistant-fab{
    position:fixed; bottom:24px; right:24px; z-index:1000;
    width:58px; height:58px; border-radius:50%;
    background:var(--grad, linear-gradient(120deg,#2DD4BF,#3B82F6)); color:#04121A;
    display:flex; align-items:center; justify-content:center;
    cursor:pointer; box-shadow:0 10px 28px -8px rgba(45,212,191,.55);
    transition:transform .15s;
}
.assistant-fab:hover{transform:translateY(-2px) scale(1.04)}
.assistant-fab svg{width:26px; height:26px}

.assistant-panel{
    position:fixed; bottom:94px; right:24px; z-index:1000;
    width:min(360px, calc(100vw - 32px)); height:min(480px, calc(100vh - 140px));
    background:var(--panel, #131824); border:1px solid var(--line, rgba(148,163,184,.14));
    border-radius:16px; box-shadow:0 20px 50px -12px rgba(0,0,0,.5);
    display:flex; flex-direction:column; overflow:hidden;
}
.assistant-panel-header{
    padding:16px 18px; border-bottom:1px solid var(--line, rgba(148,163,184,.14));
    background:var(--panel-2, #1e2430);
}
.assistant-panel-header strong{display:block; font-size:.98rem; color:var(--white, #F8FAFC)}
.assistant-panel-sub{font-size:.78rem; color:var(--slate, #94A3B8)}

.assistant-panel-messages{
    flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:10px;
}
.assistant-bubble{
    max-width:82%; padding:10px 14px; border-radius:14px; font-size:.88rem; line-height:1.45;
    white-space:pre-wrap; word-break:break-word;
}
.assistant-bubble-bot{
    align-self:flex-start; background:var(--panel-2, #1e2430); color:var(--white, #F8FAFC);
    border-bottom-left-radius:4px;
}
.assistant-bubble-user{
    align-self:flex-end; background:var(--grad, linear-gradient(120deg,#2DD4BF,#3B82F6)); color:#04121A; font-weight:500;
    border-bottom-right-radius:4px;
}
.assistant-bubble-error{
    align-self:flex-start; background:rgba(248,113,113,.12); color:var(--danger, #F87171);
    border:1px solid rgba(248,113,113,.3);
}
.assistant-typing{opacity:.6; font-style:italic}

.assistant-panel-input{
    display:flex; gap:8px; padding:12px; border-top:1px solid var(--line, rgba(148,163,184,.14));
    background:var(--panel-2, #1e2430);
}
.assistant-panel-input input{
    flex:1; background:var(--ink, #0b0f17); border:1px solid var(--line, rgba(148,163,184,.14)); border-radius:20px;
    padding:9px 16px; color:var(--white, #F8FAFC); font-family:inherit; font-size:.88rem;
}
.assistant-panel-input input:focus{outline:none; border-color:var(--cyan, #2DD4BF)}
.assistant-panel-input button{
    width:38px; height:38px; border-radius:50%; border:none; background:var(--grad, linear-gradient(120deg,#2DD4BF,#3B82F6));
    color:#04121A; font-size:1rem; cursor:pointer; flex-shrink:0;
}
.assistant-panel-input button:disabled{opacity:.4; cursor:default}

@media (max-width: 480px){
    .assistant-panel{ right:16px; bottom:88px; }
    .assistant-fab{ right:16px; bottom:16px; }
}
