﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* ═══ Κοινά στυλ back-office ═══
   Μοιράζονται web host (BackOffice) και desktop host (WPF/BlazorWebView).
   Παλέτα σχεδιαστή (xromatiki.jpg):
   #A76055 terracotta · #2E5761 σκούρο teal · #4A808D teal · #7B968E sage
   #F9C578 amber · #58355E μωβ · #ACACAC γκρι · #F0FFFC mint · #FCF4F2 κρεμ
   Μοναδική εξαίρεση: #C62828 (errors).
   Όπου γίνεται χρησιμοποιούνται var(--mud-palette-*) ώστε να ακολουθεί
   αυτόματα το MunicipalityTheme. */

html, body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

/* ===== Buttons normal case (όχι ALL CAPS) ===== */
.mud-button-root {
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: 500 !important;
}

/* ===== Header χρήστη ===== */
.user-menu .mud-menu-list {
    min-width: 200px;
}

.user-button-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: white;
}

/* ===== Λίστες ===== */
.citizen-name-cell {
    display: flex;
    align-items: center;
}

.sort-number {
    min-width: 32px;
    text-align: center;
    color: #4A808D;
    font-weight: 600;
}

/* ===== Ticket Details ===== */
.ticket-top-bar {
    display: flex;
    align-items: center;
    gap: 16px;
}

.flex-grow-1 {
    flex-grow: 1;
}

.info-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 8px 0;
}

.info-icon {
    margin-top: 2px;
    color: #ACACAC;
}

/* ===== Comments ===== */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
}

    .comments-list::-webkit-scrollbar {
        width: 6px;
    }

    .comments-list::-webkit-scrollbar-thumb {
        background: var(--mud-palette-lines-inputs);
        border-radius: 3px;
    }

    .comments-list::-webkit-scrollbar-track {
        background: transparent;
    }

.comment-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #F0FFFC;
}

.comment-internal {
    background: rgba(249, 197, 120, 0.22);
    border-left: 3px solid var(--mud-palette-warning, #F9C578);
}

.comment-avatar {
    flex-shrink: 0;
}

.comment-body {
    flex-grow: 1;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.comment-content {
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== Attachments ===== */
.attachment-row {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 4px 8px;
}

/* ===== Dashboard ===== */
.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    background: var(--mud-palette-surface, #FFFFFF);
    border: 1px solid rgba(172, 172, 172, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
}

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }

.stat-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

    .stat-icon-wrap .mud-icon-root {
        width: 28px;
        height: 28px;
    }

.stat-info .stat-icon-wrap {
    background: rgba(74, 128, 141, 0.15);
}

    .stat-info .stat-icon-wrap .mud-icon-root {
        color: #4A808D;
    }

.stat-primary .stat-icon-wrap {
    background: rgba(167, 96, 85, 0.15);
}

    .stat-primary .stat-icon-wrap .mud-icon-root {
        color: #A76055;
    }

.stat-success .stat-icon-wrap {
    background: rgba(123, 150, 142, 0.2);
}

    .stat-success .stat-icon-wrap .mud-icon-root {
        color: #7B968E;
    }

.stat-neutral .stat-icon-wrap {
    background: #F0FFFC;
}

    .stat-neutral .stat-icon-wrap .mud-icon-root {
        color: #2E5761;
    }

.stat-label {
    color: #ACACAC !important;
    font-weight: 600 !important;
}

.stat-value {
    font-weight: 700 !important;
    color: var(--mud-palette-text-primary, #2E5761) !important;
    margin-top: 4px !important;
}

.dashboard-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(172, 172, 172, 0.35);
}

.dashboard-table {
    border-radius: 0 !important;
}

/* ===== Audit Log details ===== */
.audit-detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
}

.audit-detail-label {
    font-weight: 600;
    color: #4A808D;
    min-width: 120px;
}

.audit-json {
    background: #F0FFFC;
    border: 1px solid rgba(172, 172, 172, 0.35);
    border-radius: 6px;
    padding: 12px;
    font-size: 12px;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
}

/* ===== Icon Picker ===== */
.icon-picker {
    width: 100%;
}

.icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
    gap: 8px;
    max-height: 280px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid rgba(172, 172, 172, 0.35);
    border-radius: 8px;
    background: #FCF4F2;
}

.icon-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: white;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    color: #2E5761;
}

    .icon-cell:hover {
        background: rgba(167, 96, 85, 0.12);
        color: #A76055;
    }

.icon-cell-selected {
    background: rgba(167, 96, 85, 0.12);
    border-color: #A76055;
    color: #A76055;
}

/* ===== Category custom icon image ===== */
.category-icon-image {
    display: inline-block;
    object-fit: contain;
    vertical-align: middle;
}

.category-icon-sm {
    width: 20px;
    height: 20px;
}

.category-icon-md {
    width: 24px;
    height: 24px;
}

.category-icon-lg {
    width: 36px;
    height: 36px;
}

/* ===== Custom icon upload ===== */
.custom-icon-section {
    padding: 16px;
    border: 1px dashed #ACACAC;
    border-radius: 8px;
    background: #FCF4F2;
    text-align: center;
}

.custom-icon-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px;
}

.custom-icon-img {
    width: 96px;
    height: 96px;
    object-fit: contain;
    border: 1px solid rgba(172, 172, 172, 0.35);
    border-radius: 8px;
    background: white;
    padding: 8px;
}

.custom-icon-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* ===== InfoPages ===== */
.info-page-hero {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 24px;
}

/* Το HTML του editor δεν κληρονομεί τυπογραφία από το MudBlazor */
.info-page-html {
    line-height: 1.7;
    font-size: 1rem;
}

    .info-page-html h2 {
        font-size: 1.5rem;
        margin: 1.5em 0 .5em;
    }

    .info-page-html h3 {
        font-size: 1.25rem;
        margin: 1.25em 0 .5em;
    }

    .info-page-html p {
        margin: 0 0 1em;
    }

    .info-page-html ul,
    .info-page-html ol {
        margin: 0 0 1em;
        padding-left: 1.75em;
    }

    .info-page-html li {
        margin-bottom: .35em;
    }

    .info-page-html a {
        text-decoration: underline;
    }

    .info-page-html blockquote {
        margin: 1.5em 0;
        padding: .5em 1.25em;
        border-left: 4px solid var(--mud-palette-primary);
        background: var(--mud-palette-background-grey);
    }

    .info-page-html table {
        width: 100%;
        border-collapse: collapse;
        margin: 1.5em 0;
    }

    .info-page-html th,
    .info-page-html td {
        border: 1px solid var(--mud-palette-lines-default);
        padding: 8px 12px;
        text-align: left;
    }

    .info-page-html th {
        background: var(--mud-palette-background-grey);
        font-weight: 600;
    }

    .info-page-html img {
        max-width: 100%;
        height: auto;
        border-radius: 4px;
    }

/* ═══════════════════════════════════════════════════════════════
   ΑΝΕΝΕΡΓΑ — μεταφέρθηκαν σχολιασμένα από το app.css ώστε να μην
   αλλάξει η τρέχουσα εμφάνιση. Ενεργοποίησέ τα αν τα θέλεις πίσω.
   ═══════════════════════════════════════════════════════════════ */

/* Κοινά στυλ back-office — μοιράζονται web host και desktop host */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.page-title {
    font-weight: 500;
}

.page-subtitle {
    color: var(--mud-palette-text-secondary);
}

.main-content {
    background-color: var(--mud-palette-background);
    min-height: 100vh;
}

.nav-menu {
    padding-top: 8px;
}

.nav-section-title {
    display: block;
    padding: 12px 16px 4px;
    opacity: 0.6;
    letter-spacing: 0.08em;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 48px 16px;
    color: var(--mud-palette-text-secondary);
}

.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.user-button-name {
    text-transform: none;
    font-weight: 400;
}

.sort-cell {
    cursor: pointer;
    user-select: none;
}
