/* ============================================================
   Claim Management System — Minimal White/Grey + Blue Accent
   ============================================================ */

:root {
    /* Colors */
    --bg:            #fafbfc;
    --bg-card:       #ffffff;
    --bg-subtle:     #f3f4f6;
    --bg-hover:      #f9fafb;

    --text:          #1a1d21;
    --text-secondary:#6b7280;
    --text-muted:    #9ca3af;

    --border:        #e5e7eb;
    --border-strong: #d1d5db;

    /* Accent — μπλε */
    --accent:        #2563eb;
    --accent-hover:  #1d4ed8;
    --accent-light:  #eff6ff;
    --accent-ring:   rgba(37, 99, 235, .15);

    /* Status colors */
    --danger:        #dc2626;
    --danger-bg:     #fef2f2;
    --danger-border: #fecaca;

    --success:       #059669;
    --success-bg:    #f0fdf4;
    --success-border:#bbf7d0;

    --warning:       #d97706;
    --warning-bg:    #fffbeb;
    --warning-border:#fde68a;

    --info:          #2563eb;
    --info-bg:       #eff6ff;
    --info-border:   #bfdbfe;

    /* Layout */
    --radius:        8px;
    --radius-sm:     6px;
    --radius-lg:     12px;

    /* Shadows — πολύ απαλές */
    --shadow-sm:     0 1px 2px rgba(16, 24, 40, .04);
    --shadow:        0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-md:     0 4px 12px rgba(16, 24, 40, .06), 0 2px 4px rgba(16, 24, 40, .04);
    --shadow-lg:     0 12px 32px rgba(16, 24, 40, .08), 0 4px 8px rgba(16, 24, 40, .04);

    /* Typography */
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: "SF Mono", Monaco, "Cascadia Code", "Roboto Mono", Consolas, monospace;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

a {
    color: var(--text);
    text-decoration: none;
    transition: color .15s;
}
a:hover {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -.01em;
}

img, svg, video {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================================
   Auth pages (login / register / forgot / reset)
   ============================================================ */

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: linear-gradient(135deg, #fafbfc 0%, #f0f4f9 100%);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 32px 24px 24px;
    position: relative;
    overflow: hidden;
}
.auth-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, #60a5fa 50%, var(--accent) 100%);
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}
.auth-logo h1 {
    font-size: 19px;
    margin: 0 0 6px;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: -.02em;
}
.auth-sub {
    margin: 0;
    color: var(--text-secondary);
    font-size: 13.5px;
}

.auth-links {
    margin-top: 22px;
    text-align: center;
    font-size: 13.5px;
    color: var(--text-secondary);
}
.auth-links a {
    color: var(--accent);
    font-weight: 500;
}
.auth-links a:hover {
    color: var(--accent-hover);
}
.auth-links .sep {
    color: var(--text-muted);
    margin: 0 10px;
    user-select: none;
}

.auth-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
}

/* ============================================================
   Forms
   ============================================================ */

.form-group {
    margin-bottom: 18px;
}
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-card);
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}
.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: var(--text-muted);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-ring);
}
.form-group input:disabled,
.form-group input[readonly] {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.form-hint {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted);
}
.form-hint.is-error {
    color: var(--danger);
}

.password-wrap {
    position: relative;
}
.password-wrap input {
    padding-right: 42px;
}
.toggle-password {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 15px;
    cursor: pointer;
    padding: 6px 8px;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: background .15s, color .15s;
}
.toggle-password:hover {
    background: var(--accent-light);
    color: var(--accent);
}

/* ============================================================
   Buttons
   ============================================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
    white-space: nowrap;
}
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.btn-block { width: 100%; display: flex; }

.btn-primary {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 1px 2px rgba(37, 99, 235, .2);
}
.btn-primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(37, 99, 235, .25);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text);
    border-color: var(--border-strong);
}
.btn-secondary:hover {
    background: var(--bg-subtle);
    border-color: var(--text-muted);
    color: var(--text);
    text-decoration: none;
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border-color: transparent;
}
.btn-ghost:hover {
    background: var(--bg-subtle);
    color: var(--text);
    text-decoration: none;
}

.btn-danger {
    background: var(--bg-card);
    color: var(--danger);
    border-color: var(--danger-border);
}
.btn-danger:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
    color: var(--danger);
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}
.btn-lg {
    padding: 12px 22px;
    font-size: 15px;
}

/* ============================================================
   Alerts
   ============================================================ */

.alert {
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    line-height: 1.45;
}
.alert + .alert { margin-top: -8px; }

.alert-success {
    background: var(--success-bg);
    border-color: var(--success-border);
    color: #065f46;
}
.alert-error {
    background: var(--danger-bg);
    border-color: var(--danger-border);
    color: #991b1b;
}
.alert-warning {
    background: var(--warning-bg);
    border-color: var(--warning-border);
    color: #92400e;
}
.alert-info {
    background: var(--info-bg);
    border-color: var(--info-border);
    color: #1e40af;
}

/* ============================================================
   Dashboard / App layout
   ============================================================ */

.app-page {
    min-height: 100vh;
    background: var(--bg);
}

.app-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 0 rgba(16, 24, 40, .04);
}
.app-header .header-left {
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    min-width: 0;
}
.app-header .brand {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: -.01em;
    white-space: nowrap;
}
.app-header .brand:hover {
    text-decoration: none;
    color: var(--accent-hover);
}
.app-header .header-total {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: var(--accent-light);
    border: 1px solid var(--info-border);
    border-radius: var(--radius-sm);
    white-space: nowrap;
}
.app-header .header-total-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .4px;
}
.app-header .header-total-value {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
    letter-spacing: -.01em;
}
.app-header .header-total-value .currency {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: 4px;
}
.app-header .user-area {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13.5px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}
.app-header .user-area strong {
    color: var(--text);
    font-weight: 500;
}

.app-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

/* Total card */
.total-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}
.total-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--accent), #60a5fa);
}
.total-card .label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}
.total-card .value {
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
}
.total-card .value .currency {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: 6px;
}

/* Toolbar */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.toolbar .meta {
    font-size: 13.5px;
    color: var(--text-secondary);
}
.toolbar .meta strong {
    color: var(--text);
    font-weight: 600;
}
.toolbar .actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Table card */
.table-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table thead th {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.data-table tbody tr:last-child td {
    border-bottom: none;
}
.data-table tbody tr:hover {
    background: var(--bg-hover);
}
.data-table .num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.data-table .actions-cell {
    text-align: right;
    white-space: nowrap;
}
.data-table .actions-cell .btn + .btn {
    margin-left: 6px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}
.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: .4;
}
.empty-state h3 {
    font-size: 16px;
    margin: 0 0 6px;
    color: var(--text);
}
.empty-state p {
    margin: 0 0 20px;
    font-size: 14px;
}

/* Form card (record-form) */
.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 28px 28px 24px;
    max-width: 900px;
    margin: 0 auto;
}
.form-card h1 {
    font-size: 20px;
    margin: 0 0 6px;
}
.form-card .subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin: 0 0 24px;
}
.form-section {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-top: 20px;
}
.form-section h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: var(--text-secondary);
    margin: 0 0 14px;
}
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
}

/* Total preview στο form (legacy) */
.total-preview {
    background: var(--accent-light);
    border: 1px solid var(--info-border);
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.total-preview .tp-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}
.total-preview .tp-value {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}

/* ============================================================
   Crypto pairs — 2 πεδία δίπλα-δίπλα
   ============================================================ */

.crypto-pairs {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.crypto-pair {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px 14px;
    background: var(--bg-subtle);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.crypto-pair .form-group {
    margin-bottom: 0;
}
.crypto-pair .form-group label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .3px;
    color: var(--text-secondary);
}

@media (min-width: 576px) {
    .crypto-pair {
        grid-template-columns: 1fr 1fr;
        align-items: end;
        gap: 14px;
    }
}

/* ============================================================
   Photo upload
   ============================================================ */

.photo-upload-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.photo-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}
.photo-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px;
    /* ❌ ΟΧΙ aspect-ratio εδώ — το ύψος καθορίζεται από το περιεχόμενο */
}
.photo-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;   /* μόνο το thumb είναι τετράγωνο */
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-subtle);
    flex-shrink: 0;        /* να μη συρρικνώνεται */
}
.photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.photo-item .photo-delete {
    width: 100%;
    justify-content: center;
    font-size: 12.5px;
    padding: 7px 10px;
    flex-shrink: 0;        /* ⚠️ ΣΗΜΑΝΤΙΚΟ: να μη συρρικνώνεται */
    display: flex;
    align-items: center;
    gap: 4px;
    min-height: 34px;
}

.photo-item-uploading {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    border: 1px dashed var(--border-strong);
    border-radius: var(--radius-sm);
    background: var(--bg-subtle);
    padding: 8px;
}
.photo-loading {
    font-size: 20px;
    color: var(--text-muted);
}

/* ============================================================
   Utilities
   ============================================================ */

.text-center { text-align: center; }
.text-muted  { color: var(--text-secondary); }
.text-small  { font-size: 13px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }

/* ============================================================
   Responsive — Mobile first
   ============================================================ */

/* Touch-friendly buttons */
@media (hover: none) and (pointer: coarse) {
    .btn { min-height: 44px; }
    .toggle-password { min-width: 44px; min-height: 44px; }
}

/* ---------- Mobile (default, < 576px) ---------- */
.auth-card {
    padding: 28px 20px 22px;
}
.auth-logo h1 {
    font-size: 18px;
}
.form-group input,
.form-group select,
.form-group textarea {
    font-size: 16px; /* αποτρέπει zoom σε iOS */
}

/* ---------- Tablet (≥ 576px) ---------- */
@media (min-width: 576px) {
    .auth-card {
        padding: 32px 28px 24px;
    }
    .auth-logo h1 {
        font-size: 19px;
    }
    .form-grid {
        grid-template-columns: 1fr 1fr;
    }
    .form-grid .full {
        grid-column: 1 / -1;
    }
}

/* ---------- Desktop (≥ 992px) ---------- */
@media (min-width: 992px) {
    .auth-card {
        padding: 36px 32px 26px;
    }
}

/* ---------- Mobile header + tables ---------- */
@media (max-width: 640px) {
    .app-header {
        padding: 10px 14px;
        gap: 10px;
    }
    .app-header .header-left {
        gap: 12px;
        flex: 1 1 100%;
        justify-content: space-between;
    }
    .app-header .header-total {
        padding: 5px 10px;
        gap: 6px;
    }
    .app-header .header-total-label {
        font-size: 9px;
    }
    .app-header .header-total-value {
        font-size: 13px;
    }
    .app-header .header-total-value .currency {
        font-size: 10px;
    }
    .app-header .user-area {
        flex: 1 1 100%;
        justify-content: space-between;
        font-size: 12.5px;
    }
    .app-container {
        padding: 16px 12px 30px;
    }
    .total-card {
        padding: 20px 20px;
    }
    .total-card .value {
        font-size: 24px;
    }
    .form-card {
        padding: 20px 16px;
    }
    .data-table thead th,
    .data-table tbody td {
        padding: 10px 12px;
        font-size: 13px;
    }
    .data-table .actions-cell .btn {
        padding: 5px 9px;
        font-size: 12px;
    }
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 10px;
    }
    .photo-item {
        padding: 6px;
    }
    .photo-item .photo-delete {
        font-size: 12px;
        padding: 6px 8px;
    }
}

@media (max-width: 480px) {
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
        gap: 10px;
    }
}

/* ---------- Reduce motion ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
/* ============================================================
   Lightbox — preview φωτογραφίας
   ============================================================ */

.photo-thumb {
    cursor: zoom-in;
}

.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    opacity: 0;
    transition: opacity .2s;
}
.lightbox.is-open {
    display: flex;
    opacity: 1;
}
.lightbox img {
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 40px rgba(0, 0, 0, .5);
    background: #fff;
}
.lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .15);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, .4);
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s, transform .1s;
}
.lightbox-close:hover {
    background: var(--danger);
    border-color: #fff;
    transform: scale(1.1);
}
.lightbox-close:active {
    transform: scale(0.95);
}

@media (max-width: 640px) {
    .lightbox img {
        max-width: 100vw;
        max-height: 85vh;
    }
    .lightbox-close {
        width: 40px;
        height: 40px;
        font-size: 22px;
        top: 10px;
        right: 10px;
    }
}

/* ============================================================
   Badges & Modal (admin users)
   ============================================================ */

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    letter-spacing: .3px;
    text-transform: uppercase;
}
.badge-admin {
    background: var(--accent-light);
    color: var(--accent);
    border: 1px solid var(--info-border);
}
.badge-user {
    background: var(--bg-subtle);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.modal {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
}
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .5);
}
.modal-content {
    position: relative;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 28px 24px 24px;
    max-width: 440px;
    width: 100%;
}
.modal-content h2 {
    font-size: 17px;
    margin: 0 0 18px;
    color: var(--accent);
}
/* ============================================================
   Group stats (admin)
   ============================================================ */

.group-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.group-stat-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    text-decoration: none;
    color: var(--text);
    transition: border-color .15s, box-shadow .15s, transform .1s;
    cursor: pointer;
}
.group-stat-card:hover {
    border-color: var(--accent);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transform: translateY(-1px);
}
.group-stat-card.is-active {
    border-color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 0 0 3px var(--accent-ring);
}

.group-stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 6px;
}
.group-stat-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.group-stat-total {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.group-stat-total .currency {
    font-size: 10px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-left: 3px;
}

/* Responsive */
@media (max-width: 640px) {
    .group-stats {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }
    .group-stat-card {
        padding: 10px 12px;
    }
    .group-stat-total {
        font-size: 13px;
    }
}
/* ============================================================
   Dropdown (admin toolbar)
   ============================================================ */

.dropdown {
    position: relative;
    display: inline-block;
}
.dropdown-toggle {
    cursor: pointer;
}
.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    min-width: 220px;
    z-index: 1000;
    overflow: hidden;
    padding: 4px;
}
.dropdown.is-open .dropdown-menu {
    display: block;
}
.dropdown-item {
    display: block;
    padding: 9px 12px;
    font-size: 13px;
    color: var(--text);
    text-decoration: none;
    border-radius: 4px;
    white-space: nowrap;
}
.dropdown-item:hover {
    background: var(--bg-subtle);
    color: var(--text);
    text-decoration: none;
}

/* Κλείσιμο dropdown όταν πατάς έξω */
.dropdown.is-open::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 999;
}

@media (max-width: 640px) {
    .dropdown-menu {
        right: auto;
        left: 0;
    }
}
/* Admin — grouped by user */
.user-row:hover {
    background: var(--bg-hover) !important;
}
.user-row .toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: var(--accent-light);
    color: var(--accent);
    font-weight: 700;
    font-size: 14px;
    user-select: none;
}
.record-row td {
    font-size: 12.5px;
}
/* Admin — smooth toggle για grouped rows */
.record-row {
    will-change: opacity, transform;
}

/* Hover στο + */
.user-row .toggle-icon {
    transition: background .15s, transform .15s;
}
.user-row:hover .toggle-icon {
    background: var(--accent);
    color: #fff;
    transform: scale(1.1);
}
html {
    overflow-y: scroll;
}
/* Στο style.css */
a.contract-link {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
}
a.contract-link:hover {
    color: var(--accent-hover);
    text-decoration: none;   /* ή underline αν θέλεις */
}