:root {
    --brand-primary: #31594d;
    --brand-secondary: #e9d7b3;
    --ink: var(--brand-text, #1d2925);
    --muted: #6a7772;
    --surface: #ffffff;
    --surface-soft: #f6f7f4;
    --line: #e2e7e3;
    --danger: #b84444;
    --warning: #9a6c23;
    --success: #2e755c;
    --sidebar-width: 270px;
    --radius: 18px;
    --shadow: 0 18px 50px rgba(28, 48, 41, .08);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; color: var(--ink); background: var(--brand-surface, #f2f4f1); }
button, input, select { font: inherit; }
a { color: inherit; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar-width); background: var(--brand-primary); color: var(--brand-primary-text, white); display: flex; flex-direction: column; padding: 22px 16px; z-index: 30; }
.brand-block { display: flex; gap: 12px; align-items: center; padding: 4px 8px 25px; }
.brand-mark { width: 48px; height: 48px; border-radius: 15px; background: rgba(255,255,255,.11); display: grid; place-items: center; overflow: hidden; flex: 0 0 48px; }
.brand-mark svg { width: 31px; fill: var(--brand-secondary); color: var(--brand-secondary); }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-block strong, .brand-block span { display: block; }
.brand-block strong { font-size: 15px; }
.brand-block span { font-size: 11px; color: rgba(255,255,255,.61); margin-top: 3px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 5px; overflow-y: auto; }
.nav-section-label { padding: 19px 12px 6px; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.42); }
.nav-item { min-height: 45px; display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px; text-decoration: none; font-size: 13px; color: rgba(255,255,255,.78); transition: .18s ease; }
a.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.1); color: white; }
.nav-item.active { box-shadow: inset 3px 0 var(--brand-secondary); }
.nav-item.disabled { opacity: .42; cursor: not-allowed; }
.nav-icon { width: 20px; text-align: center; font-size: 18px; }
.soon { margin-left: auto; font-size: 9px; padding: 3px 6px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; text-transform: uppercase; }
.sidebar-user { margin-top: auto; padding: 14px 8px 2px; display: flex; align-items: center; gap: 10px; border-top: 1px solid rgba(255,255,255,.12); }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-secondary); color: #243d35; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: 0 0 auto; }
.avatar.small { width: 36px; height: 36px; font-size: 12px; }
.sidebar-user-text { min-width: 0; flex: 1; }
.sidebar-user-text strong, .sidebar-user-text span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-text strong { font-size: 12px; }
.sidebar-user-text span { font-size: 10px; color: rgba(255,255,255,.55); margin-top: 2px; }
.icon-button { border: 0; background: transparent; color: white; cursor: pointer; font-size: 20px; opacity: .72; }
.main-content { margin-left: var(--sidebar-width); min-height: 100vh; }
.topbar { min-height: 100px; padding: 23px 38px; display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.86); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
.topbar h1 { font-family: inherit; font-size: 27px; line-height: 1.1; margin: 3px 0 0; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .14em; font-size: 10px; font-weight: 700; color: var(--brand-primary); }
.topbar-role { margin-left: auto; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: white; border-radius: 999px; padding: 8px 13px; font-size: 12px; color: var(--muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #46a27d; box-shadow: 0 0 0 4px #e2f2eb; }
.menu-toggle { display: none; border: 0; background: transparent; font-size: 22px; cursor: pointer; }
.content-area { padding: 30px 38px 46px; max-width: 1500px; margin: 0 auto; }
.welcome-panel { background: linear-gradient(120deg, #24493e, var(--brand-primary)); color: white; border-radius: 24px; padding: 30px 32px; display: flex; align-items: center; justify-content: space-between; gap: 20px; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.welcome-panel::after { content: ''; position: absolute; width: 240px; height: 240px; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; right: -70px; top: -100px; box-shadow: 0 0 0 40px rgba(255,255,255,.025), 0 0 0 80px rgba(255,255,255,.02); }
.welcome-panel h2 { font-family: inherit; font-size: clamp(23px, 3vw, 34px); max-width: 680px; margin: 7px 0 8px; }
.welcome-panel p:not(.eyebrow) { margin: 0; color: rgba(255,255,255,.72); font-size: 13px; }
.welcome-panel .eyebrow { color: var(--brand-secondary); }
.phase-badge { z-index: 1; width: 115px; height: 115px; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; display: grid; place-items: center; align-content: center; gap: 2px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; background: rgba(255,255,255,.06); }
.phase-badge span { font-family: inherit; font-size: 34px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 20px 0; }
.stat-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; gap: 15px; align-items: center; box-shadow: 0 6px 25px rgba(28,48,41,.035); }
.stat-card .stat-icon { width: 43px; height: 43px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--brand-primary) 10%, white); color: var(--brand-primary); font-size: 19px; }
.stat-card span, .stat-card strong, .stat-card small { display: block; }
.stat-card span { color: var(--muted); font-size: 11px; }
.stat-card strong { font-size: 25px; margin-top: 2px; }
.stat-card small { font-size: 9px; color: #9aa39f; }
.muted-card { opacity: .69; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1.15fr; gap: 20px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 30px rgba(28,48,41,.035); }
.panel-header { min-height: 76px; padding: 19px 22px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); gap: 15px; }
.panel-header h3 { margin: 4px 0 0; font-size: 16px; }
.permission-list, .activity-list { padding: 11px 22px 20px; }
.permission-row { display: flex; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid #eef1ef; }
.permission-row:last-child { border-bottom: 0; }
.permission-row > span { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; }
.permission-row.allowed > span { color: var(--success); background: #eaf5f0; }
.permission-row.locked { opacity: .55; }
.permission-row.locked > span { background: #edf0ee; }
.permission-row strong, .permission-row small { display: block; }
.permission-row strong { font-size: 13px; }
.permission-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.role-chip { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 700; }
.role-admin { background: #eee7fb; color: #6845a1; }
.role-manager { background: #fff0d9; color: #8b5d14; }
.role-employee { background: #e2f2eb; color: #267052; }
.activity-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid #eef1ef; }
.activity-item:last-child { border-bottom: 0; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand-primary); margin-top: 5px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand-primary) 12%, white); }
.activity-item strong, .activity-item small { display: block; }
.activity-item strong { font-size: 12px; font-weight: 600; }
.activity-item small { color: var(--muted); font-size: 10px; margin-top: 4px; }
.text-link { color: var(--brand-primary); text-decoration: none; font-size: 11px; font-weight: 700; }
.roadmap-panel { margin-top: 20px; }
.roadmap { padding: 23px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 13px; }
.roadmap-step { position: relative; display: flex; gap: 10px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-soft); }
.roadmap-step > span { width: 27px; height: 27px; border-radius: 50%; border: 1px solid #cad2ce; display: grid; place-items: center; font-size: 11px; flex: 0 0 27px; }
.roadmap-step strong, .roadmap-step small { display: block; }
.roadmap-step strong { font-size: 12px; }
.roadmap-step small { color: var(--muted); font-size: 9px; line-height: 1.35; margin-top: 3px; }
.roadmap-step.complete { background: color-mix(in srgb, var(--brand-primary) 8%, white); border-color: color-mix(in srgb, var(--brand-primary) 25%, white); }
.roadmap-step.complete > span { background: var(--brand-primary); color: white; border-color: var(--brand-primary); }
.page-actions { display: flex; justify-content: space-between; align-items: center; margin-bottom: 17px; gap: 15px; }
.muted { color: var(--muted); margin: 0; font-size: 13px; }
.button { border: 1px solid transparent; border-radius: 11px; padding: 10px 15px; text-decoration: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; transition: .17s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--brand-primary); color: white; }
.button-secondary { background: white; color: var(--brand-primary); border-color: color-mix(in srgb, var(--brand-primary) 25%, white); }
.button-ghost { background: #f4f6f4; color: var(--ink); border-color: var(--line); }
.button-small { padding: 7px 10px; font-size: 10px; }
.button-block { width: 100%; min-height: 47px; }
.table-panel { overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 15px 18px; text-align: left; border-bottom: 1px solid var(--line); font-size: 12px; vertical-align: middle; }
th { color: var(--muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; background: #fafbf9; }
tbody tr:hover { background: #fbfcfb; }
td small { display: block; color: var(--muted); font-size: 9px; margin-top: 3px; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell strong, .user-cell small { display: block; }
.status-pill { padding: 5px 9px; border-radius: 999px; font-size: 9px; font-weight: 700; }
.status-pill.active { color: var(--success); background: #eaf5f0; }
.status-pill.inactive { color: var(--danger); background: #faeaea; }
.actions-col { text-align: right; white-space: nowrap; }
.inline-form { display: inline; }
.form-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(270px, .65fr); gap: 20px; align-items: start; }
.form-panel { padding: 24px; }
.form-panel > .panel-header { margin: -24px -24px 23px; }
.form-stack { display: flex; flex-direction: column; gap: 17px; }
.form-grid { display: grid; gap: 16px; }
.two-cols { grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > span { font-size: 11px; font-weight: 700; }
.field input, .field select { width: 100%; border: 1px solid #d7ded9; border-radius: 11px; min-height: 44px; padding: 10px 12px; background: white; color: var(--ink); outline: none; }
.field input:focus, .field select:focus { border-color: var(--brand-primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 11%, white); }
.field small { font-size: 9px; color: var(--muted); }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 65px; }
.password-toggle { position: absolute; right: 8px; top: 8px; border: 0; background: #eef2ef; border-radius: 8px; padding: 6px 9px; font-size: 9px; cursor: pointer; }
.checkbox-row { display: flex; align-items: center; gap: 9px; font-size: 11px; color: var(--muted); }
.checkbox-row input { accent-color: var(--brand-primary); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.guidance-panel, .preview-panel { padding: 24px; }
.guidance-panel h3 { font-family: inherit; margin: 5px 0 18px; font-size: 21px; }
.role-guide { padding: 13px 0; border-bottom: 1px solid var(--line); }
.role-guide:last-child { border-bottom: 0; }
.role-guide strong, .role-guide span { display: block; }
.role-guide strong { font-size: 12px; }
.role-guide span { color: var(--muted); font-size: 10px; margin-top: 4px; }
.color-field > div { display: grid; grid-template-columns: 45px 1fr; gap: 8px; }
.color-field input[type="color"] { padding: 4px; }
.brand-preview { --preview-primary: var(--brand-primary); --preview-secondary: var(--brand-secondary); min-height: 270px; border-radius: 20px; padding: 28px 22px; background: linear-gradient(145deg, var(--preview-primary), color-mix(in srgb, var(--preview-primary) 75%, black)); color: white; display: flex; flex-direction: column; align-items: center; text-align: center; margin-top: 15px; }
.preview-logo { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 26px; background: var(--preview-secondary); color: var(--preview-primary); }
.brand-preview strong { font-family: inherit; margin-top: 15px; font-size: 22px; }
.brand-preview > span { color: rgba(255,255,255,.66); font-size: 10px; margin-top: 4px; }
.preview-stamps { display: flex; gap: 7px; margin: 27px 0 10px; }
.preview-stamps i { width: 23px; height: 23px; border: 2px solid rgba(255,255,255,.7); border-radius: 50%; }
.brand-preview small { color: rgba(255,255,255,.65); }
.scope-note { padding: 18px 3px 0; }
.scope-note strong, .scope-note span { display: block; }
.scope-note strong { font-size: 11px; }
.scope-note span { color: var(--muted); font-size: 9px; margin-top: 4px; line-height: 1.5; }
.filter-panel { padding: 18px; margin-bottom: 17px; }
.filter-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 14px; }
.filter-actions { display: flex; gap: 8px; }
code { background: #edf2ef; color: #31594d; border-radius: 7px; padding: 4px 7px; font-size: 10px; }
.nowrap { white-space: nowrap; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 15px; padding: 16px; font-size: 10px; }
.empty-state { padding: 35px 10px; text-align: center; color: var(--muted); }
.empty-state strong, .empty-state span { display: block; }
.empty-state strong { color: var(--ink); font-size: 13px; }
.empty-state span { font-size: 10px; margin-top: 4px; }
.flash-stack { display: grid; gap: 8px; margin-bottom: 17px; }
.alert { border-radius: 11px; padding: 11px 14px; font-size: 11px; border: 1px solid transparent; }
.alert-success { background: #eaf5f0; border-color: #c8e6d9; color: #276b50; }
.alert-danger { background: #faeaea; border-color: #f0c9c9; color: #9a3636; }
.alert-warning { background: #fff5df; border-color: #f0dfb9; color: #8a601d; }
.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1.08fr .92fr; background: white; }
.auth-visual { min-height: 100vh; padding: 55px 65px; background: radial-gradient(circle at 80% 10%, rgba(233,215,179,.18), transparent 32%), linear-gradient(145deg, #17362e, #2c5a4c); color: white; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-visual::after { content: ''; position: absolute; width: 500px; height: 500px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -250px; bottom: -180px; box-shadow: 0 0 0 80px rgba(255,255,255,.025), 0 0 0 160px rgba(255,255,255,.015); }
.auth-brand { max-width: 530px; z-index: 1; }
.auth-logo { width: 70px; height: 70px; border-radius: 22px; background: rgba(255,255,255,.1); display: grid; place-items: center; margin-bottom: 45px; }
.auth-logo svg { width: 43px; fill: var(--brand-secondary); color: var(--brand-secondary); }
.auth-brand .eyebrow { color: var(--brand-secondary); }
.auth-brand h1 { font-family: inherit; font-size: clamp(42px, 6vw, 74px); line-height: .98; margin: 12px 0 18px; }
.auth-brand > p:last-child { color: rgba(255,255,255,.66); max-width: 420px; line-height: 1.6; }
.auth-quote { z-index: 1; display: flex; flex-direction: column; gap: 5px; border-left: 2px solid var(--brand-secondary); padding-left: 15px; }
.auth-quote strong { font-size: 12px; }
.auth-quote span { font-size: 10px; color: rgba(255,255,255,.56); }
.auth-panel { display: grid; place-items: center; padding: 35px; }
.auth-card { width: min(410px, 100%); }
.auth-card h2 { font-family: inherit; font-size: 33px; margin: 7px 0 5px; }
.auth-card > .muted { margin-bottom: 27px; }
.mobile-brand { display: none; font-family: inherit; font-weight: 700; font-size: 20px; margin-bottom: 35px; }
.error-card { max-width: 560px; margin: 60px auto; padding: 45px; background: white; border-radius: 22px; border: 1px solid var(--line); text-align: center; }
.error-card > strong { font-family: inherit; font-size: 65px; color: var(--brand-primary); }
.error-card h2 { margin: 4px 0; }
.error-card p { color: var(--muted); margin-bottom: 25px; }
.standalone-error { min-height: 100vh; padding: 30px; display: grid; place-items: center; background: #f2f4f1; }
.sidebar-backdrop { display: none; }

@media (max-width: 1150px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .roadmap { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: 20px 0 60px rgba(0,0,0,.18); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(8,20,16,.45); opacity: 0; pointer-events: none; z-index: 25; transition: .2s; }
    .sidebar-backdrop.visible { opacity: 1; pointer-events: auto; }
    body.sidebar-open { overflow: hidden; }
    .dashboard-grid, .form-layout { grid-template-columns: 1fr; }
    .auth-page { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-panel { min-height: 100vh; }
    .mobile-brand { display: block; }
}
@media (max-width: 680px) {
    .topbar { min-height: 82px; padding: 18px 19px; }
    .topbar h1 { font-size: 22px; }
    .topbar-role { display: none; }
    .content-area { padding: 20px 15px 35px; }
    .welcome-panel { padding: 24px 20px; }
    .phase-badge { display: none; }
    .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 14px; gap: 10px; }
    .stat-card .stat-icon { width: 35px; height: 35px; }
    .stat-card strong { font-size: 20px; }
    .roadmap { grid-template-columns: 1fr; }
    .two-cols, .filter-form { grid-template-columns: 1fr; }
    .filter-actions, .form-actions { flex-wrap: wrap; }
    .page-actions { align-items: flex-start; flex-direction: column; }
    .auth-panel { padding: 28px 20px; }
}

.role-overview { grid-template-columns: repeat(3, 1fr); }


/* Φάση 2 — minimal branding workspace */
textarea{font:inherit}.field textarea{width:100%;border:1px solid #d7ded9;border-radius:11px;padding:11px 12px;background:#fff;color:var(--ink);outline:none;resize:vertical;line-height:1.5}.field textarea:focus{border-color:var(--brand-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand-primary) 11%,white)}
.auth-logo img{width:100%;height:100%;object-fit:contain;padding:6px}.auth-flashes{margin-top:18px}.audit-action{display:block;font-weight:700;font-size:11px}.settings-hint{font-size:10px;color:var(--muted)}
.branding-workspace{display:grid;grid-template-columns:minmax(0,1fr) 390px;gap:22px;align-items:start}.branding-main{display:flex;flex-direction:column;gap:18px;min-width:0}.settings-section{overflow:hidden}.settings-body{padding:22px}.settings-body>.field+.field{margin-top:16px}.color-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px}.logo-settings-grid{display:grid;grid-template-columns:minmax(210px,.7fr) minmax(0,1.3fr);gap:24px}.current-logo-card{border:1px solid var(--line);border-radius:16px;padding:20px;text-align:center;background:var(--surface-soft)}.current-logo-frame{width:112px;height:112px;border-radius:24px;margin:0 auto 15px;background:#fff;border:1px solid var(--line);display:grid;place-items:center;overflow:hidden;font-size:42px}.current-logo-frame img{width:100%;height:100%;object-fit:contain;padding:8px}.current-logo-card strong,.current-logo-card span{display:block}.current-logo-card strong{font-size:13px}.current-logo-card span{font-size:10px;line-height:1.5;color:var(--muted);margin-top:5px}.logo-options{display:flex;flex-direction:column;gap:10px}.choice-card{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--line);border-radius:13px;padding:13px;cursor:pointer;background:#fff}.choice-card:has(input:checked){border-color:color-mix(in srgb,var(--brand-primary) 45%,white);background:color-mix(in srgb,var(--brand-primary) 6%,white)}.choice-card input{margin-top:2px;accent-color:var(--brand-primary)}.choice-card strong,.choice-card small{display:block}.choice-card strong{font-size:11px}.choice-card small{font-size:9px;color:var(--muted);margin-top:3px}.file-picker{display:flex;align-items:center;gap:10px;padding-left:28px}.file-picker input{position:absolute;opacity:0;pointer-events:none}.file-picker small{font-size:9px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.danger-choice{color:var(--danger);padding:4px 0 0 28px}.section-note{font-size:10px;line-height:1.55;color:var(--muted);margin:16px 0 0}.preview-links{display:flex;gap:12px;flex-wrap:wrap}.sticky-save-bar{position:sticky;bottom:14px;z-index:8;background:rgba(255,255,255,.96);backdrop-filter:blur(12px);border:1px solid var(--line);border-radius:16px;box-shadow:0 16px 46px rgba(25,43,36,.14);padding:14px 16px;display:flex;align-items:center;justify-content:space-between;gap:20px}.sticky-save-bar strong,.sticky-save-bar span{display:block}.sticky-save-bar strong{font-size:12px}.sticky-save-bar span{font-size:9px;color:var(--muted);margin-top:3px}.branding-preview-column{position:relative}.preview-panel-sticky{position:sticky;top:122px;padding:15px}.preview-tabs{display:grid;grid-template-columns:1fr 1fr;background:#edf0ed;border-radius:11px;padding:4px;margin-bottom:14px}.preview-tab{border:0;background:transparent;border-radius:8px;padding:9px;font-size:10px;font-weight:700;cursor:pointer;color:var(--muted)}.preview-tab.active{background:#fff;color:var(--ink);box-shadow:0 3px 12px rgba(24,42,35,.08)}.preview-pane{display:none}.preview-pane.active{display:block}.customer-card-mini{--preview-primary:var(--brand-primary);--preview-secondary:var(--brand-secondary);--preview-accent:var(--brand-accent);--preview-surface:var(--brand-surface);--preview-text:var(--brand-text);background:#fff;border:1px solid var(--line);border-radius:19px;overflow:hidden;text-align:center;color:var(--preview-text)}.mini-brand-row{background:var(--preview-primary);color:#fff;padding:16px;display:flex;align-items:center;gap:9px;text-align:left}.mini-brand-row>span{font-weight:700;font-size:12px}.mini-logo{width:38px;height:38px;border-radius:11px;background:var(--preview-secondary);display:grid;place-items:center;overflow:hidden;font-size:19px;flex:0 0 38px}.mini-logo img{width:100%;height:100%;object-fit:contain;padding:3px}.mini-card-copy{padding:22px 20px 5px}.mini-card-copy small{color:var(--preview-primary);font-size:9px;font-weight:700}.mini-card-copy h4{font-size:19px;line-height:1.22;margin:8px 0}.mini-card-copy p{font-size:10px;line-height:1.5;color:#6d746f;margin:0}.mini-stamps{display:flex;justify-content:center;gap:6px;margin:20px 0 9px}.mini-stamps i{width:28px;height:28px;border:2px solid color-mix(in srgb,var(--preview-primary) 25%,white);border-radius:50%;font-style:normal;display:grid;place-items:center;font-size:10px}.mini-stamps i.filled{background:var(--preview-primary);border-color:var(--preview-primary);color:#fff}.mini-progress{display:block;font-size:11px}.mini-qr{width:74px;height:74px;margin:17px auto 7px;border:1px solid var(--line);border-radius:11px;display:grid;place-items:center;font-size:49px;line-height:1;background:#fff}.customer-card-mini>small{display:block;font-size:8px;color:var(--muted);padding-bottom:18px}.email-mini{--preview-primary:var(--brand-primary);--preview-secondary:var(--brand-secondary);--preview-accent:var(--brand-accent);--preview-surface:var(--brand-surface);--preview-text:var(--brand-text);background:var(--preview-surface);border-radius:18px;padding:13px;color:var(--preview-text)}.email-mini-header{background:var(--preview-primary);color:#fff;border-radius:13px 13px 0 0;padding:14px;display:flex;align-items:center;gap:9px}.email-mini-header strong{font-size:12px}.email-mini-body{background:#fff;padding:22px 18px;text-align:center}.email-pill{display:inline-block;padding:6px 9px;border-radius:999px;background:var(--preview-secondary);font-size:8px;font-weight:700}.email-mini-body h4{font-size:18px;line-height:1.25;margin:13px 0 7px}.email-mini-body p{font-size:9px;color:var(--muted)}.email-progress{padding:15px;background:var(--preview-surface);border-radius:12px;margin:14px 0}.email-progress b,.email-progress span{display:block}.email-progress b{font-size:25px;color:var(--preview-primary)}.email-progress span{font-size:9px;color:var(--muted);margin-top:3px}.email-mini-body button{border:0;background:var(--preview-primary);color:#fff;border-radius:9px;padding:9px 13px;font-size:9px;font-weight:700}.email-mini-footer{background:#f5f6f4;border-radius:0 0 13px 13px;padding:13px;text-align:center;font-size:8px;color:var(--muted);line-height:1.45}
@media(max-width:1200px){.branding-workspace{grid-template-columns:1fr}.branding-preview-column{order:-1}.preview-panel-sticky{position:static}.preview-pane.active{max-width:440px;margin:0 auto}.color-grid{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.logo-settings-grid{grid-template-columns:1fr}.color-grid{grid-template-columns:1fr 1fr}.sticky-save-bar{flex-direction:column;align-items:stretch}.sticky-save-bar .button{width:100%}.settings-body{padding:18px}.preview-links{display:none}}
@media(max-width:480px){.color-grid{grid-template-columns:1fr}.branding-workspace{gap:14px}.settings-section .panel-header{align-items:flex-start}.file-picker{padding-left:0;flex-wrap:wrap}.danger-choice{padding-left:0}}

/* Αυτόματη αντίθεση για ανοιχτά ή σκούρα brand colors */
.sidebar{color:var(--brand-primary-text,#fff)}.brand-block span,.sidebar-user-text span{color:color-mix(in srgb,var(--brand-primary-text,#fff) 62%,transparent)}.nav-section-label{color:color-mix(in srgb,var(--brand-primary-text,#fff) 45%,transparent)}.nav-item{color:color-mix(in srgb,var(--brand-primary-text,#fff) 78%,transparent)}a.nav-item:hover,.nav-item.active{background:color-mix(in srgb,var(--brand-primary-text,#fff) 10%,transparent);color:var(--brand-primary-text,#fff)}.sidebar-user{border-top-color:color-mix(in srgb,var(--brand-primary-text,#fff) 15%,transparent)}.icon-button{color:var(--brand-primary-text,#fff)}.welcome-panel{color:var(--brand-primary-text,#fff)}.welcome-panel p:not(.eyebrow){color:color-mix(in srgb,var(--brand-primary-text,#fff) 72%,transparent)}.mini-brand-row,.email-mini-header{color:var(--preview-primary-text,#fff)}

/* Φάση 3 — διαχείριση πελατών */
.customer-stats{margin-top:0}.customer-filter-panel{margin-bottom:18px}.customer-filter-form{padding:18px 20px;display:grid;grid-template-columns:minmax(280px,2fr) minmax(145px,.7fr) minmax(180px,.85fr) auto;gap:13px;align-items:end}.customer-filter-actions{display:flex;gap:8px;align-items:center;padding-bottom:1px}.customer-table-panel{overflow:hidden}.customer-avatar{background:color-mix(in srgb,var(--brand-secondary) 72%,white);color:color-mix(in srgb,var(--brand-primary) 85%,black)}.table-primary,.table-secondary{display:block}.table-primary{font-size:11px}.table-secondary{font-size:9px;color:var(--muted);margin-top:4px}.row-muted{opacity:.66}.consent-pill{display:inline-flex;align-items:center;border-radius:999px;padding:6px 9px;font-size:9px;font-weight:700;white-space:nowrap}.consent-pill.accepted{background:#e7f4ed;color:#286b4f}.consent-pill.essential{background:#edf0ee;color:#66716c}.customer-empty-state{padding:55px 24px}.customer-empty-state .button{margin-top:16px}.empty-state-icon{width:52px;height:52px;border-radius:17px;background:color-mix(in srgb,var(--brand-primary) 10%,white);color:var(--brand-primary);display:grid;place-items:center;font-size:25px;margin:0 auto 13px}.pagination{display:flex;justify-content:center;align-items:center;gap:18px;margin-top:18px;font-size:11px;color:var(--muted)}.pagination a{color:var(--brand-primary);font-weight:700;text-decoration:none}.customer-form-layout{grid-template-columns:minmax(0,1fr) 340px}.customer-form .field small{max-width:560px}.consent-section{border-top:1px solid var(--line);padding-top:22px;margin-top:4px}.consent-section-heading h3{font-size:15px;margin:4px 0 13px}.consent-card{position:relative;display:flex;gap:13px;align-items:flex-start;border:1px solid var(--line);border-radius:15px;padding:15px;margin-top:10px;background:#fff;cursor:pointer}.consent-card:hover{border-color:color-mix(in srgb,var(--brand-primary) 32%,white)}.consent-card:has(input:checked){background:color-mix(in srgb,var(--brand-primary) 5%,white);border-color:color-mix(in srgb,var(--brand-primary) 38%,white)}.consent-card input{position:absolute;opacity:0;pointer-events:none}.consent-check{width:26px;height:26px;display:grid;place-items:center;flex:0 0 26px;border-radius:8px;border:1px solid #cdd5d1;color:transparent;font-size:11px;font-weight:800}.consent-card:has(input:checked) .consent-check{background:var(--brand-primary);border-color:var(--brand-primary);color:var(--brand-primary-text,#fff)}.consent-card strong,.consent-card small{display:block}.consent-card strong{font-size:12px}.consent-card small{font-size:9px;line-height:1.55;color:var(--muted);margin-top:4px}.required-consent strong::after{content:' Απαραίτητο';font-size:8px;text-transform:uppercase;letter-spacing:.08em;color:var(--brand-primary);margin-left:6px}.customer-form-actions{margin-top:5px}.customer-guidance{height:max-content}.guidance-check{display:flex;gap:12px;padding:13px 0;border-bottom:1px solid var(--line)}.guidance-check>span{width:27px;height:27px;border-radius:9px;display:grid;place-items:center;flex:0 0 27px;background:color-mix(in srgb,var(--brand-primary) 10%,white);color:var(--brand-primary);font-weight:800;font-size:10px}.guidance-check strong,.guidance-check small{display:block}.guidance-check strong{font-size:11px}.guidance-check small{font-size:9px;line-height:1.45;color:var(--muted);margin-top:3px}.customer-meta-box{margin-top:20px;border-radius:13px;background:var(--surface-soft);padding:14px;display:grid;grid-template-columns:auto 1fr;gap:7px 12px}.customer-meta-box span{font-size:9px;color:var(--muted)}.customer-meta-box strong{font-size:9px;text-align:right}.customer-detail-actions{align-items:center}.back-link{color:var(--brand-primary);text-decoration:none;font-size:11px;font-weight:700}.detail-action-group{display:flex;gap:8px;align-items:center}.button-danger-soft{background:#fff3f2;color:#a63e38;border-color:#f1d1ce}.customer-detail-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr);gap:18px}.customer-profile-card{overflow:hidden}.customer-profile-hero{padding:26px;display:flex;align-items:center;gap:17px;background:linear-gradient(135deg,color-mix(in srgb,var(--brand-primary) 9%,white),white)}.customer-profile-avatar{width:72px;height:72px;border-radius:23px;background:var(--brand-primary);color:var(--brand-primary-text,#fff);display:grid;place-items:center;font-weight:800;font-size:22px;box-shadow:0 12px 28px color-mix(in srgb,var(--brand-primary) 18%,transparent)}.customer-profile-hero h2{font-size:25px;margin:8px 0 3px}.customer-profile-hero p{font-size:10px;color:var(--muted);margin:0}.customer-info-list{padding:6px 26px 22px;display:grid;grid-template-columns:1fr 1fr;column-gap:28px}.customer-info-list>div{padding:15px 0;border-bottom:1px solid var(--line)}.customer-info-list span,.customer-info-list strong{display:block}.customer-info-list span{font-size:9px;color:var(--muted);margin-bottom:4px}.customer-info-list strong{font-size:11px;overflow-wrap:anywhere}.customer-detail-side{display:flex;flex-direction:column;gap:18px}.consent-summary-list{padding:8px 20px 18px}.consent-summary-row{display:flex;gap:11px;align-items:flex-start;padding:13px 0;border-bottom:1px solid var(--line)}.consent-summary-row:last-child{border-bottom:0}.consent-summary-row>span{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;flex:0 0 27px;font-size:10px}.consent-summary-row.active>span{background:#e6f4ed;color:#277252}.consent-summary-row.inactive>span{background:#edf0ee;color:#7b8580}.consent-summary-row strong,.consent-summary-row small{display:block}.consent-summary-row strong{font-size:11px}.consent-summary-row small{font-size:9px;color:var(--muted);margin-top:4px;line-height:1.4}.customer-security-note{padding:18px;display:flex;gap:13px;align-items:flex-start;background:color-mix(in srgb,var(--brand-secondary) 20%,white)}.security-note-icon{width:39px;height:39px;border-radius:12px;background:var(--brand-secondary);color:var(--brand-secondary-text,#1d2925);display:grid;place-items:center;flex:0 0 39px;font-size:20px}.customer-security-note strong{font-size:11px}.customer-security-note p{font-size:9px;color:var(--muted);line-height:1.5;margin:5px 0 0}.customer-activity-panel{margin-top:18px}.customer-activity-list{padding-top:5px}.activity-copy{min-width:0}.customer-page-actions{margin-bottom:16px}
@media(max-width:1100px){.customer-filter-form{grid-template-columns:1fr 1fr}.customer-search-field{grid-column:1/-1}.customer-filter-actions{justify-content:flex-end}.customer-detail-grid{grid-template-columns:1fr}.customer-form-layout{grid-template-columns:1fr}.customer-guidance{order:-1}.customer-guidance .guidance-check{display:none}.customer-meta-box{margin-top:0}}
@media(max-width:760px){.customer-filter-form{grid-template-columns:1fr}.customer-search-field{grid-column:auto}.customer-filter-actions{justify-content:stretch}.customer-filter-actions .button{flex:1}.customer-info-list{grid-template-columns:1fr}.customer-profile-hero{padding:21px}.customer-profile-avatar{width:58px;height:58px;border-radius:19px}.customer-profile-hero h2{font-size:21px}.customer-detail-actions{align-items:stretch}.detail-action-group{width:100%;flex-wrap:wrap}.detail-action-group .button,.detail-action-group form{flex:1}.detail-action-group form .button{width:100%}.customer-stats{grid-template-columns:1fr 1fr}.customer-form-actions{flex-direction:column-reverse}.customer-form-actions .button{width:100%}}
@media(max-width:480px){.customer-stats{grid-template-columns:1fr}.customer-profile-hero{align-items:flex-start}.consent-card{padding:13px}.customer-table-panel table{min-width:860px}}
.dashboard-quick-action{text-decoration:none;color:inherit}.dashboard-action-list{padding:8px 20px 18px}.dashboard-action{display:grid;grid-template-columns:38px 1fr auto;gap:12px;align-items:center;text-decoration:none;padding:14px 2px;border-bottom:1px solid var(--line)}.dashboard-action:last-child{border-bottom:0}.dashboard-action>span{width:36px;height:36px;border-radius:12px;background:color-mix(in srgb,var(--brand-primary) 10%,white);color:var(--brand-primary);display:grid;place-items:center;font-size:17px}.dashboard-action strong,.dashboard-action small{display:block}.dashboard-action strong{font-size:12px}.dashboard-action small{font-size:9px;color:var(--muted);margin-top:3px}.dashboard-action>b{font-size:15px;color:var(--brand-primary)}

/* Φάση 4 — προσωπικό QR, ψηφιακή κάρτα και προστατευμένη προβολή */
.privacy-banner{margin:18px 26px 0;padding:12px 14px;border-radius:13px;background:#f3f6f4;border:1px solid #dfe8e2;display:flex;gap:10px;align-items:flex-start}.privacy-banner>span{color:var(--brand-primary);font-size:9px;margin-top:3px}.privacy-banner strong,.privacy-banner small{display:block}.privacy-banner strong{font-size:10px}.privacy-banner small{font-size:9px;color:var(--muted);margin-top:3px;line-height:1.45}.protected-field{display:block}.protected-value{min-height:42px;border:1px solid var(--line);background:#f5f7f6;border-radius:11px;padding:12px 13px;font-size:11px;font-weight:700;letter-spacing:.02em;color:#59645f}.customer-qr-card{overflow:hidden}.customer-qr-body{padding:6px 20px 20px;text-align:center}.customer-qr-image{width:190px;height:190px;margin:8px auto 12px;padding:9px;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:0 14px 34px rgba(24,45,37,.08)}.customer-qr-image img{display:block;width:100%;height:100%;object-fit:contain}.customer-qr-body>p{font-size:9px;line-height:1.55;color:var(--muted);max-width:320px;margin:0 auto 15px}.customer-qr-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}.button-full{width:100%;margin-top:8px}.qr-meta{display:block;color:var(--muted);font-size:8px;line-height:1.55;margin-top:13px}.button:disabled{opacity:.45;cursor:not-allowed}.public-save-link{display:inline-flex;margin-top:10px;padding:8px 13px;border-radius:10px;text-decoration:none;background:var(--secondary);color:var(--text);font-size:10px;font-weight:750}
@media(max-width:760px){.privacy-banner{margin:15px 20px 0}.customer-qr-actions{grid-template-columns:1fr}.customer-qr-image{width:174px;height:174px}}
.customer-qr-image.qr-disabled{display:grid;place-items:center;background:#f4f5f4}.qr-disabled-copy strong,.qr-disabled-copy span{display:block}.qr-disabled-copy strong{font-size:13px;color:#6d7772}.qr-disabled-copy span{font-size:9px;color:var(--muted);margin-top:5px}

/* Φάση 5 — loyalty engine, συναλλαγές και scanner */
.loyalty-operation-body{padding:18px 20px 20px}.loyalty-balance-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.loyalty-balance-grid>div{padding:14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-soft)}.loyalty-balance-grid span,.loyalty-balance-grid strong{display:block}.loyalty-balance-grid span{font-size:9px;color:var(--muted);line-height:1.35}.loyalty-balance-grid strong{font-size:21px;margin-top:5px}.loyalty-balance-grid .reward-balance{background:color-mix(in srgb,var(--brand-secondary) 38%,white)}.loyalty-stamps{display:flex;gap:7px;justify-content:center;flex-wrap:wrap;margin:18px 0 10px}.loyalty-stamps i{width:34px;height:34px;border-radius:50%;border:2px solid color-mix(in srgb,var(--brand-primary) 22%,white);display:grid;place-items:center;font-style:normal;font-size:11px;color:var(--brand-primary-text,#fff);font-weight:800}.loyalty-stamps i.filled{background:var(--brand-primary);border-color:var(--brand-primary)}.loyalty-remaining{text-align:center;font-size:9px;color:var(--muted);line-height:1.5;margin:0 0 16px}.coffee-purchase-form{padding-top:15px;border-top:1px solid var(--line)}.form-label{display:block;font-size:10px;font-weight:750;margin-bottom:8px}.coffee-quantity-buttons{display:grid;grid-template-columns:repeat(3,1fr) 1.25fr;gap:7px;margin-bottom:10px}.coffee-quantity-button,.coffee-custom-quantity{min-height:48px;border:1px solid var(--line);background:#fff;border-radius:12px;display:grid;place-items:center;font-weight:800;color:var(--brand-primary)}.coffee-quantity-button{cursor:pointer}.coffee-quantity-button.active{background:var(--brand-primary);border-color:var(--brand-primary);color:var(--brand-primary-text,#fff)}.coffee-custom-quantity{grid-template-columns:auto 50px;padding:0 8px;gap:5px}.coffee-custom-quantity span{font-size:9px}.coffee-custom-quantity input{width:50px;border:0;background:transparent;outline:none;text-align:center;font-weight:800;color:var(--ink)}.button-reward{background:var(--brand-accent);color:#fff;margin-top:8px}.loyalty-rule{display:block;text-align:center;margin-top:12px;color:var(--muted);font-size:8px;line-height:1.5}.loyalty-history-panel{margin-top:18px}.loyalty-history-list{padding:5px 20px 17px}.loyalty-history-row{display:grid;grid-template-columns:36px 1fr auto;gap:12px;align-items:center;padding:13px 0;border-bottom:1px solid var(--line)}.loyalty-history-row:last-child{border-bottom:0}.loyalty-history-icon{width:34px;height:34px;border-radius:11px;display:grid;place-items:center;font-size:18px;font-weight:800}.loyalty-history-icon.purchase{background:#e7f4ed;color:#2b7357}.loyalty-history-icon.reward_redemption{background:#fff0da;color:#8b5d14}.loyalty-history-row strong,.loyalty-history-row small{display:block}.loyalty-history-row strong{font-size:11px}.loyalty-history-row small{font-size:8px;color:var(--muted);margin-top:4px;line-height:1.4}.loyalty-history-balance{text-align:right}.transaction-table-panel table{min-width:920px}.customer-link{text-decoration:none}.customer-link strong,.customer-link small{display:block}.customer-link small{font-size:8px;color:var(--muted);margin-top:3px}.transaction-kind{display:inline-flex;padding:5px 8px;border-radius:999px;font-size:9px;font-weight:700}.transaction-kind.purchase{background:#e7f4ed;color:#2b7357}.transaction-kind.reward_redemption{background:#fff0da;color:#8b5d14}.transaction-table-panel td>small{display:block;font-size:8px;color:var(--muted);margin-top:3px}
.scanner-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,.55fr);gap:18px}.scanner-side{display:flex;flex-direction:column;gap:18px}.scanner-secure-pill{font-size:9px;font-weight:700;padding:6px 9px;border-radius:999px;background:#e8f4ee;color:#2b7357}.scanner-body{padding:20px}.scanner-viewport{position:relative;aspect-ratio:4/3;max-height:580px;border-radius:22px;overflow:hidden;background:#0b1411;border:1px solid #1e2f29}.scanner-viewport video{width:100%;height:100%;object-fit:cover;display:none}.scanner-viewport video.visible{display:block}.scanner-placeholder{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;text-align:center;padding:25px;color:#dce6e1}.scanner-placeholder.hidden{display:none}.scanner-placeholder-icon{font-size:54px;line-height:1;color:var(--brand-secondary)}.scanner-placeholder strong{font-size:15px;margin-top:12px}.scanner-placeholder small{font-size:10px;color:#91a29a;margin-top:6px;max-width:330px;line-height:1.5}.scanner-frame{position:absolute;inset:50% auto auto 50%;width:min(58%,300px);aspect-ratio:1;transform:translate(-50%,-50%);border:2px solid rgba(255,255,255,.82);border-radius:22px;box-shadow:0 0 0 999px rgba(0,0,0,.22);pointer-events:none}.scanner-frame::before,.scanner-frame::after,.scanner-frame i::before,.scanner-frame i::after{content:'';position:absolute;width:34px;height:34px;border-color:var(--brand-secondary);border-style:solid}.scanner-frame::before{left:-3px;top:-3px;border-width:4px 0 0 4px;border-radius:12px 0 0 0}.scanner-frame::after{right:-3px;top:-3px;border-width:4px 4px 0 0;border-radius:0 12px 0 0}.scanner-frame i::before{left:-3px;bottom:-3px;border-width:0 0 4px 4px;border-radius:0 0 0 12px}.scanner-frame i::after{right:-3px;bottom:-3px;border-width:0 4px 4px 0;border-radius:0 0 12px 0}.scanner-status{margin:13px 0 10px;text-align:center;font-size:10px;color:var(--muted)}.scanner-status.success{color:var(--success);font-weight:700}.scanner-status.error{color:var(--danger);font-weight:700}.scanner-status.warning{color:var(--warning);font-weight:700}.scanner-status.active{color:var(--brand-primary);font-weight:700}.scanner-actions{display:flex;justify-content:center;gap:8px}.scanner-photo-form{padding:18px 20px 20px}.scanner-photo-picker{display:flex;flex-direction:column;align-items:center;text-align:center;border:1px dashed color-mix(in srgb,var(--brand-primary) 35%,white);border-radius:16px;padding:20px;cursor:pointer;background:var(--surface-soft)}.scanner-photo-picker input{position:absolute;opacity:0;pointer-events:none}.scanner-photo-picker>span{font-size:27px;color:var(--brand-primary)}.scanner-photo-picker strong{font-size:11px;margin-top:8px}.scanner-photo-picker small{font-size:9px;color:var(--muted);line-height:1.45;margin-top:5px}.scanner-help-copy{padding:18px 20px 20px}.scanner-help-copy p{font-size:10px;color:var(--muted);line-height:1.55;margin:0 0 14px}
@media(max-width:980px){.scanner-layout{grid-template-columns:1fr}.scanner-side{display:grid;grid-template-columns:1fr 1fr}.scanner-viewport{max-height:none}}
@media(max-width:680px){.loyalty-balance-grid{grid-template-columns:1fr}.coffee-quantity-buttons{grid-template-columns:repeat(3,1fr)}.coffee-custom-quantity{grid-column:1/-1}.loyalty-history-row{grid-template-columns:34px 1fr}.loyalty-history-balance{grid-column:2;text-align:left}.scanner-side{grid-template-columns:1fr}.scanner-body{padding:14px}.scanner-viewport{border-radius:17px}.scanner-actions{flex-direction:column}.scanner-actions .button{width:100%}.scanner-frame{width:66%}}
.loyalty-history-row.reversed{opacity:.62;background:#fafafa}.loyalty-history-row.reversed .loyalty-history-icon{filter:grayscale(1)}.loyalty-reversal-form{grid-column:2/-1;display:grid;grid-template-columns:1fr auto;gap:8px;margin-top:3px}.loyalty-reversal-form input{min-height:38px;border:1px solid var(--line);border-radius:10px;padding:8px 10px;font-size:9px;outline:none}.loyalty-reversal-form input:focus{border-color:var(--brand-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand-primary) 10%,white)}
@media(max-width:680px){.loyalty-reversal-form{grid-column:1/-1;grid-template-columns:1fr}.loyalty-reversal-form .button{width:100%}}
.transaction-table-panel tr.reversed{opacity:.58}.transaction-table-panel tr.reversed td{background:#fafafa}

/* Phase 6 · Microsoft Graph and email delivery */
.notification-layout{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(300px,.8fr);gap:22px;align-items:start}.notification-side-column{display:grid;gap:22px}.notification-settings-card,.notification-test-card,.notification-help-card{overflow:hidden}.graph-status-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.graph-status-grid>div{display:flex;flex-direction:column;gap:5px;padding:14px;border:1px solid var(--border,#e5e9e6);border-radius:14px;background:#fafbf9}.graph-status-grid span{font-size:12px;color:var(--muted,#6a746e)}.graph-status-grid strong{font-size:13px;overflow-wrap:anywhere}.toggle-list{display:grid;gap:10px}.toggle-row{display:flex;align-items:flex-start;gap:12px;padding:14px;border:1px solid var(--border,#e5e9e6);border-radius:14px;cursor:pointer}.toggle-row input{margin-top:3px}.toggle-row span{display:flex;flex-direction:column;gap:3px}.toggle-row small{color:var(--muted,#6a746e);line-height:1.45}.graph-last-test{margin-top:16px;padding:14px;border-radius:14px;display:grid;gap:4px}.graph-last-test.success{background:#edf8f2;color:#246443}.graph-last-test.failed{background:#fff1f0;color:#9d3029}.graph-last-test span,.graph-last-test small{font-size:12px;line-height:1.5}.setup-steps{margin:0;padding-left:20px;display:grid;gap:10px;color:var(--brand-text)}.setup-steps li{padding-left:4px;line-height:1.5}.email-status-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}.email-status-card{display:flex;justify-content:space-between;align-items:center;padding:17px 18px;border:1px solid #e4e8e5;border-radius:16px;background:#fff;text-decoration:none;color:inherit;transition:.18s ease}.email-status-card:hover,.email-status-card.active{transform:translateY(-1px);border-color:var(--brand-primary);box-shadow:0 8px 26px rgba(24,47,39,.08)}.email-status-card span{font-size:13px;color:#68716c}.email-status-card strong{font-size:24px}.email-status-card.sent strong{color:#27825a}.email-status-card.failed strong{color:#b23a32}.outbox-filter-row{display:flex;justify-content:space-between;align-items:center;padding:16px 18px;border-bottom:1px solid #edf0ed}.outbox-table small{display:block;margin-top:4px;color:#758079;line-height:1.35}.email-delivery-status{display:inline-flex;padding:6px 9px;border-radius:999px;font-size:11px;font-weight:700}.email-delivery-status.prepared{background:#f2f0e8;color:#6e5c29}.email-delivery-status.sending{background:#edf2fb;color:#355b93}.email-delivery-status.sent{background:#eaf7ef;color:#247348}.email-delivery-status.failed{background:#fff0ef;color:#a63630}.failure-text{max-width:340px;color:#9c3932!important;overflow-wrap:anywhere}.button-small{padding:8px 11px;font-size:12px}.table-actions{white-space:nowrap}
@media(max-width:1000px){.notification-layout{grid-template-columns:1fr}.notification-side-column{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:760px){.notification-side-column{grid-template-columns:1fr}.graph-status-grid,.email-status-cards{grid-template-columns:1fr 1fr}.outbox-filter-row{align-items:flex-start;gap:10px;flex-direction:column}}@media(max-width:480px){.graph-status-grid,.email-status-cards{grid-template-columns:1fr}}

/* Phase 7 · Security center, devices and abuse controls */
.topbar-status-group{display:flex;align-items:center;gap:10px}.topbar-device-status{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--muted);font-size:9px;font-weight:700;text-decoration:none;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.topbar-device-status span{width:7px;height:7px;border-radius:50%;background:#9aa39e;flex:none}.topbar-device-status.approved span{background:#2f8a62}.topbar-device-status.pending span{background:#c68a27}.topbar-device-status.revoked span{background:#b9473f}.security-device-layout{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(290px,.7fr);gap:22px;align-items:start}.security-device-card{overflow:hidden}.device-current-summary{display:flex;gap:15px;align-items:center;padding:20px}.device-icon{width:52px;height:52px;border-radius:16px;display:grid;place-items:center;background:color-mix(in srgb,var(--brand-primary) 11%,white);color:var(--brand-primary);font-size:24px}.device-current-summary strong,.device-current-summary span,.device-current-summary small{display:block}.device-current-summary strong{font-size:15px}.device-current-summary span,.device-current-summary small{font-size:10px;color:var(--muted);margin-top:4px}.security-notice{margin:0 20px 18px;padding:15px 16px;border-radius:15px;display:flex;flex-direction:column;gap:5px;border:1px solid var(--line)}.security-notice strong{font-size:12px}.security-notice span{font-size:10px;line-height:1.5}.security-notice.success{background:#edf8f2;border-color:#cfe8db;color:#246443}.security-notice.warning{background:#fff8e8;border-color:#eed9a8;color:#795819}.security-notice.danger{background:#fff0ef;border-color:#efd0cd;color:#963b35}.security-notice.neutral{background:#f7f8f7;color:var(--muted)}.security-device-card>.form-stack,.security-device-card>form{padding:0 20px 20px}.security-stat-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}.security-stat-card{padding:18px;border:1px solid var(--line);border-radius:17px;background:#fff;display:flex;flex-direction:column;gap:5px}.security-stat-card span{font-size:10px;color:var(--muted)}.security-stat-card strong{font-size:23px}.security-stat-card small{font-size:9px;color:var(--muted)}.security-stat-card.danger strong{color:#aa3d36}.security-stat-card.warning strong{color:#a66d13}.security-admin-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:20px;margin-bottom:20px}.security-settings-form{padding:20px}.device-list{display:grid}.device-list-row{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:15px 18px;border-bottom:1px solid var(--line)}.device-list-row:last-child{border-bottom:0}.device-list-main{display:flex;align-items:flex-start;gap:10px;min-width:0}.device-list-main strong,.device-list-main small{display:block}.device-list-main strong{font-size:11px}.device-list-main small{font-size:8px;color:var(--muted);margin-top:4px;line-height:1.5}.device-status-dot{width:9px;height:9px;border-radius:50%;margin-top:4px;background:#9aa39e;flex:none}.device-status-dot.approved{background:#2f8a62}.device-status-dot.pending{background:#c68a27}.device-status-dot.revoked{background:#b9473f}.device-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end}.security-events-panel{overflow:hidden}.security-filter-bar{padding:15px 18px;border-bottom:1px solid var(--line);display:flex;align-items:end;gap:10px;flex-wrap:wrap}.security-filter-bar label{display:flex;flex-direction:column;gap:5px}.security-filter-bar label span{font-size:9px;color:var(--muted);font-weight:700}.security-filter-bar select{min-width:150px;min-height:38px;border:1px solid var(--line);border-radius:10px;padding:7px 10px;background:#fff}.security-event-list{display:grid}.security-event-row{display:grid;grid-template-columns:5px minmax(0,1fr) minmax(240px,.55fr);gap:15px;padding:17px 18px;border-bottom:1px solid var(--line);align-items:start}.security-event-row:last-child{border-bottom:0}.security-event-marker{height:100%;min-height:56px;border-radius:999px;background:#9aa39e}.security-event-row.severity-high .security-event-marker{background:#b9473f}.security-event-row.severity-medium .security-event-marker{background:#c68a27}.security-event-row.severity-low .security-event-marker{background:#4b8a70}.security-event-row.status-reviewed,.security-event-row.status-dismissed{opacity:.66}.security-event-heading{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.security-event-copy strong{font-size:11px}.security-event-copy p{font-size:10px;line-height:1.5;margin:5px 0;color:var(--brand-text)}.security-event-copy small{display:block;font-size:8px;color:var(--muted);line-height:1.45}.security-event-copy a{color:var(--brand-primary)}.security-severity{display:inline-flex;padding:4px 7px;border-radius:999px;font-size:8px;font-weight:800}.security-severity.high{background:#fff0ef;color:#a23832}.security-severity.medium{background:#fff6e6;color:#966418}.security-severity.low{background:#edf7f2;color:#2d7457}.review-note{margin-top:6px}.security-review-form{display:grid;grid-template-columns:1fr auto auto;gap:7px}.security-review-form input{min-height:36px;border:1px solid var(--line);border-radius:10px;padding:7px 9px;font-size:9px}.approval-pin-field,.redemption-phone-field{margin-top:10px}.reward-redemption-form{display:grid;gap:10px}.transaction-table-panel table{min-width:1100px}
@media(max-width:1050px){.security-stat-grid{grid-template-columns:1fr 1fr}.security-admin-grid,.security-device-layout{grid-template-columns:1fr}.topbar-device-status{display:none}}
@media(max-width:720px){.security-stat-grid{grid-template-columns:1fr}.device-list-row{align-items:flex-start;flex-direction:column}.device-actions{width:100%;justify-content:flex-start}.security-event-row{grid-template-columns:5px 1fr}.security-review-form{grid-column:2;grid-template-columns:1fr 1fr}.security-review-form input{grid-column:1/-1}.security-filter-bar{align-items:stretch;flex-direction:column}.security-filter-bar select,.security-filter-bar .button{width:100%}}

/* Phase 8: reports, PWA, loyalty settings and production status */
.topbar-install-button{border:1px solid color-mix(in srgb,var(--brand-primary) 24%,white);background:color-mix(in srgb,var(--brand-primary) 7%,white);color:var(--brand-primary);border-radius:999px;padding:7px 11px;font-size:9px;font-weight:800;cursor:pointer;white-space:nowrap}.topbar-install-button:hover{background:color-mix(in srgb,var(--brand-primary) 13%,white)}
.app-modal[hidden]{display:none}.app-modal{position:fixed;inset:0;z-index:100;display:grid;place-items:center;padding:20px}.app-modal-backdrop{position:absolute;inset:0;background:rgba(16,27,23,.55);backdrop-filter:blur(5px)}.app-modal-card{position:relative;width:min(430px,100%);background:#fff;border-radius:22px;padding:28px;box-shadow:0 28px 80px rgba(12,28,22,.28);text-align:center}.app-modal-card h2{margin:8px 0 9px;font-size:23px}.app-modal-card>p:not(.eyebrow){color:var(--muted);font-size:12px;line-height:1.6}.app-modal-close{position:absolute;right:14px;top:12px;border:0;background:transparent;font-size:25px;color:var(--muted);cursor:pointer}.app-modal-icon{width:60px;height:60px;border-radius:18px;margin:0 auto 14px;display:grid;place-items:center;background:color-mix(in srgb,var(--brand-primary) 11%,white);color:var(--brand-primary);font-size:27px}.ios-install-steps{text-align:left;background:var(--surface-soft);border-radius:14px;padding:15px 18px 15px 34px;font-size:11px;line-height:1.7;color:var(--muted)}.modal-open{overflow:hidden}
.reports-toolbar{align-items:flex-start}.reports-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.segmented-control{display:inline-flex;background:#fff;border:1px solid var(--line);border-radius:12px;padding:3px}.segmented-control a{text-decoration:none;padding:7px 10px;border-radius:9px;font-size:9px;font-weight:800;color:var(--muted)}.segmented-control a.active{background:var(--brand-primary);color:var(--brand-primary-text)}.reports-grid{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,.75fr);gap:20px;margin-bottom:20px}.lower-reports-grid{grid-template-columns:minmax(0,1.35fr) minmax(300px,.65fr)}.report-chart-panel{overflow:hidden}.bar-chart{height:270px;padding:24px 20px 10px;display:flex;align-items:stretch;gap:5px;overflow-x:auto}.bar-column{min-width:18px;flex:1;display:grid;grid-template-rows:18px 1fr 18px;gap:5px;align-items:end;text-align:center}.bar-value{font-size:8px;color:var(--muted);opacity:.85}.bar-track{height:100%;min-height:150px;background:linear-gradient(to top,#f1f4f2,#fafbfa);border-radius:7px;display:flex;align-items:end;overflow:hidden}.bar-track span{display:block;width:100%;min-height:2px;border-radius:7px 7px 2px 2px;background:linear-gradient(180deg,var(--brand-accent),var(--brand-primary));transition:.2s ease}.bar-column small{font-size:7px;color:#8d9994;white-space:nowrap}.chart-legend{padding:11px 20px 18px;border-top:1px solid var(--line);display:flex;justify-content:space-between;gap:14px;color:var(--muted);font-size:9px}.chart-legend span{display:flex;align-items:center;gap:6px}.legend-primary{width:9px;height:9px;border-radius:3px;background:var(--brand-primary)}.ranking-list{display:grid;padding:7px 18px 15px}.ranking-row{display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:10px;text-decoration:none;padding:11px 0;border-bottom:1px solid #eef1ef}.ranking-row:last-child{border-bottom:0}.rank-number{width:25px;height:25px;border-radius:50%;display:grid;place-items:center;background:var(--surface-soft);font-size:9px;font-weight:800;color:var(--brand-primary)}.ranking-row strong,.ranking-row small{display:block}.ranking-row strong{font-size:10px}.ranking-row small{font-size:8px;color:var(--muted);margin-top:3px}.ranking-row>b{font-size:10px;color:var(--brand-primary)}.compact-report-table{overflow:auto}.compact-report-table table{width:100%;border-collapse:collapse;min-width:620px}.compact-report-table th,.compact-report-table td{padding:11px 13px;text-align:left;border-bottom:1px solid var(--line);font-size:9px}.compact-report-table th{color:var(--muted);font-size:8px;text-transform:uppercase;letter-spacing:.07em}.health-summary-list{padding:10px 20px}.health-summary-list>div{padding:12px 0;border-bottom:1px solid var(--line);display:grid;grid-template-columns:1fr auto;align-items:center;gap:6px}.health-summary-list>div:last-child{border-bottom:0}.health-summary-list span{font-size:10px;color:var(--muted)}.health-summary-list strong{font-size:17px}.health-summary-list small{grid-column:1/-1;font-size:8px;color:var(--muted)}.health-summary-list .health-alert strong{color:var(--danger)}.health-summary-actions{display:flex;gap:16px;padding:14px 20px;border-top:1px solid var(--line)}
.settings-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(300px,.6fr);gap:20px;align-items:start}.loyalty-rule-preview{position:sticky;top:122px}.panel-form-actions{padding:16px 20px;border-top:1px solid var(--line);display:flex;justify-content:flex-end}.settings-warning{padding:14px 15px;border:1px solid #eed9a8;background:#fff8e8;border-radius:13px;color:#765719;display:flex;flex-direction:column;gap:4px}.settings-warning strong{font-size:11px}.settings-warning span{font-size:9px;line-height:1.5}.loyalty-rule-card{margin:20px;padding:24px;border-radius:20px;background:linear-gradient(150deg,var(--brand-primary),color-mix(in srgb,var(--brand-primary) 72%,#000));color:var(--brand-primary-text);text-align:center}.rule-icon{width:58px;height:58px;margin:0 auto 13px;border-radius:18px;display:grid;place-items:center;background:rgba(255,255,255,.12);font-size:25px}.loyalty-rule-card span,.loyalty-rule-card small,.loyalty-rule-card b{display:block}.loyalty-rule-card span,.loyalty-rule-card small{font-size:10px;opacity:.75}.loyalty-rule-card>strong{display:block;font-size:27px;margin:3px 0 8px}.loyalty-rule-card h4{font-size:18px;margin:5px 0 9px}.loyalty-rule-card p{font-size:10px;line-height:1.55;opacity:.82}.loyalty-rule-card b{font-size:9px;padding-top:10px;border-top:1px solid rgba(255,255,255,.18)}
.system-stats .system-stat-text{font-size:16px}.system-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:20px}.production-checks{padding:10px 20px 18px}.production-check{display:flex;gap:11px;padding:12px 0;border-bottom:1px solid var(--line)}.production-check:last-child{border-bottom:0}.production-check>span{width:27px;height:27px;border-radius:50%;display:grid;place-items:center;background:#edf0ee;color:var(--muted);font-size:11px;font-weight:800;flex:none}.production-check.ok>span{background:#e7f5ee;color:var(--success)}.production-check.warning>span{background:#fff1dc;color:var(--warning)}.production-check strong,.production-check small{display:block}.production-check strong{font-size:10px}.production-check small{font-size:8px;color:var(--muted);margin-top:3px}.backup-panel-body{padding:20px}.backup-panel-body>p{font-size:11px;line-height:1.6;color:var(--muted);margin-top:0}.backup-guidance{margin-top:18px;padding:14px;border-radius:13px;background:var(--surface-soft);display:flex;flex-direction:column;gap:4px}.backup-guidance strong{font-size:10px}.backup-guidance span{font-size:9px;line-height:1.5;color:var(--muted)}.code-note,.deployment-grid code{display:block;background:#17211d;color:#e9f2ee;border-radius:10px;padding:11px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:9px;overflow:auto}.deployment-grid{display:grid;grid-template-columns:1fr 1fr;gap:0;padding:7px 20px 20px}.deployment-grid>div{padding:15px;border-bottom:1px solid var(--line)}.deployment-grid strong,.deployment-grid small{display:block}.deployment-grid strong{font-size:10px;margin-bottom:7px}.deployment-grid small{font-size:8px;color:var(--muted);margin-top:7px;line-height:1.45}
.offline-page{min-height:100vh;display:grid;place-items:center;padding:22px;background:var(--brand-surface,#f2f4f1)}.offline-card{max-width:480px;background:#fff;border:1px solid var(--line);border-radius:24px;padding:34px;text-align:center;box-shadow:var(--shadow)}.offline-card h1{font-size:24px;margin:8px 0 10px}.offline-card>p:not(.eyebrow){font-size:12px;line-height:1.65;color:var(--muted)}.offline-icon{width:64px;height:64px;margin:0 auto 15px;border-radius:19px;display:grid;place-items:center;background:color-mix(in srgb,var(--brand-primary) 11%,white);color:var(--brand-primary);font-size:28px}

@media(max-width:1050px){.reports-grid,.lower-reports-grid,.settings-layout,.system-grid{grid-template-columns:1fr}.loyalty-rule-preview{position:static}.reports-actions{justify-content:flex-start}.deployment-grid{grid-template-columns:1fr}}
@media(max-width:720px){.reports-toolbar{display:grid}.reports-actions{width:100%}.segmented-control{width:100%;overflow:auto}.segmented-control a{flex:1;text-align:center;white-space:nowrap}.reports-stats{grid-template-columns:1fr 1fr}.bar-chart{height:230px}.chart-legend{display:grid}.app-modal-card{padding:25px 20px}.system-stats{grid-template-columns:1fr 1fr}}
@media(max-width:480px){.reports-stats,.system-stats{grid-template-columns:1fr}.bar-column{min-width:22px}}
.phase8-dashboard-grid{grid-template-columns:1.15fr .85fr}.mini-trend-chart{height:245px;padding:24px 22px 18px;display:flex;align-items:stretch;gap:12px}.mini-trend-column{flex:1;display:grid;grid-template-rows:20px 1fr 18px;text-align:center;gap:5px;align-items:end}.mini-trend-column>strong{font-size:9px;color:var(--muted)}.mini-trend-column>div{height:100%;min-height:130px;background:var(--surface-soft);border-radius:10px;display:flex;align-items:end;overflow:hidden}.mini-trend-column>div span{width:100%;min-height:3px;background:linear-gradient(180deg,var(--brand-accent),var(--brand-primary));border-radius:9px 9px 2px 2px}.mini-trend-column small{font-size:8px;color:var(--muted)}.operations-status-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:20px 0}.operations-status-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:16px;display:grid;grid-template-columns:38px 1fr auto;align-items:center;gap:11px;text-decoration:none}.operations-status-card>span{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:color-mix(in srgb,var(--brand-primary) 9%,white);color:var(--brand-primary);font-size:17px}.operations-status-card strong,.operations-status-card small{display:block}.operations-status-card strong{font-size:10px}.operations-status-card small{font-size:8px;color:var(--muted);margin-top:4px}.operations-status-card>b{font-size:12px;color:var(--brand-primary)}.operations-status-card.needs-attention{border-color:#ecc9c6;background:#fffafa}.operations-status-card.needs-attention>span{background:#fff0ef;color:var(--danger)}.status-indicator{width:9px;height:9px;border-radius:50%}.status-indicator.online{background:var(--success);box-shadow:0 0 0 4px #e2f2eb}.status-indicator.offline{background:#9ca49f}.dashboard-activity-panel{margin-top:20px}.dashboard-activity-grid{display:grid;grid-template-columns:1fr 1fr;column-gap:28px}.dashboard-activity-grid .activity-item:nth-last-child(-n+2){border-bottom:0}
@media(max-width:1050px){.phase8-dashboard-grid{grid-template-columns:1fr}.operations-status-grid{grid-template-columns:1fr}.dashboard-activity-grid{grid-template-columns:1fr}.dashboard-activity-grid .activity-item:nth-last-child(2){border-bottom:1px solid #eef1ef}}
@media(max-width:600px){.mini-trend-chart{gap:6px;padding:20px 14px}.mini-trend-column small{font-size:7px}}
