@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

html, body {
    font-family: 'Inter', 'Segoe UI', Roboto, sans-serif;
    margin: 0;
    padding: 0;
}

/* ===== Login Page ===== */

.login-page {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
    width: 100%;
}

.login-branding {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #8b5cf6 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
    overflow: hidden;
}

    .login-branding::before {
        content: '';
        position: absolute;
        width: 500px;
        height: 500px;
        background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
        top: -200px;
        right: -200px;
        border-radius: 50%;
    }

    .login-branding::after {
        content: '';
        position: absolute;
        width: 400px;
        height: 400px;
        background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
        bottom: -150px;
        left: -150px;
        border-radius: 50%;
    }

.branding-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
}

.branding-icon {
    color: white !important;
    width: 64px !important;
    height: 64px !important;
    margin-bottom: 24px;
}

.branding-title {
    color: white !important;
    font-weight: 700 !important;
    margin-bottom: 12px !important;
}

.branding-subtitle {
    color: rgba(255,255,255,0.85) !important;
    margin-bottom: 48px !important;
    font-weight: 400 !important;
}

.branding-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 16px;
    color: rgba(255,255,255,0.95);
}

    .feature .mud-icon-root {
        color: white !important;
        background: rgba(255,255,255,0.15);
        border-radius: 8px;
        padding: 8px;
        width: 40px !important;
        height: 40px !important;
    }

/* ===== Form side ===== */

.login-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background: #f8fafc;
}

.login-form-wrapper {
    width: 100%;
    max-width: 420px;
}

.form-title {
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 8px !important;
}

.form-subtitle {
    color: #64748b !important;
    margin-bottom: 32px !important;
}

.login-form {
    display: flex;
    flex-direction: column;
}

.footer-text {
    text-align: center;
    color: #94a3b8 !important;
    display: block;
}

/* ===== Mobile ===== */
@media (max-width: 960px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-branding {
        display: none;
    }

    .login-form-side {
        padding: 24px;
    }
}

/* ===== Main layout ===== */
.main-content {
    background: #f8fafc;
    min-height: 100vh;
}

.user-button-name {
    margin-left: 8px;
    font-weight: 500;
}

.user-menu .mud-menu-list {
    min-width: 200px;
}

/* Logout button μέσα σε form, να δείχνει σαν menu item */
.logout-menu-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #1e293b;
    text-align: left;
}

    .logout-menu-button:hover {
        background: rgba(0, 0, 0, 0.04);
    }

/* ===== NavMenu ===== */
.nav-menu {
    padding: 16px 8px;
}

.nav-section-title {
    display: block;
    padding: 8px 16px 4px 16px;
    color: #94a3b8 !important;
    font-weight: 600 !important;
    letter-spacing: 0.05em !important;
    font-size: 11px !important;
}

/* ===== Page common styles ===== */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.page-title {
    font-weight: 700 !important;
    color: #1e293b !important;
}

.page-subtitle {
    color: #64748b !important;
    margin-top: 4px !important;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #94a3b8;
}

.citizen-name-cell {
    display: flex;
    align-items: center;
}

.logout-menu-wrapper {
    padding: 0;
}

    .logout-menu-wrapper .logout-menu-button {
        display: flex;
        align-items: center;
        width: 100%;
        padding: 8px 16px;
        background: none;
        border: none;
        cursor: pointer;
        font-size: 14px;
        color: #1e293b;
        text-align: left;
        font-family: inherit;
    }

        .logout-menu-wrapper .logout-menu-button:hover {
            background: rgba(239, 68, 68, 0.08);
            color: #ef4444;
        }


/* ===== Buttons normal case (όχι ALL CAPS) ===== */
.mud-button-root {
    text-transform: none !important;
    letter-spacing: normal !important;
    font-weight: 500 !important;
}

/* ===== 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: #94a3b8;
}


/* ===== Comments ===== */
.comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
}

.comment-internal {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
}

.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: white;
    border: 1px solid #e2e8f0;
    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: #dbeafe;
}

    .stat-info .stat-icon-wrap .mud-icon-root {
        color: #2563eb;
    }

.stat-primary .stat-icon-wrap {
    background: #ede9fe;
}

    .stat-primary .stat-icon-wrap .mud-icon-root {
        color: #7c3aed;
    }

.stat-success .stat-icon-wrap {
    background: #d1fae5;
}

    .stat-success .stat-icon-wrap .mud-icon-root {
        color: #059669;
    }

.stat-neutral .stat-icon-wrap {
    background: #f1f5f9;
}

    .stat-neutral .stat-icon-wrap .mud-icon-root {
        color: #475569;
    }

.stat-label {
    color: #94a3b8 !important;
    font-weight: 600 !important;
}

.stat-value {
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-top: 4px !important;
}

.dashboard-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.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: #64748b;
    min-width: 120px;
}

.audit-json {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    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 #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.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: #475569;
}

    .icon-cell:hover {
        background: #ede9fe;
        color: #4f46e5;
    }

.icon-cell-selected {
    background: #ede9fe;
    border-color: #4f46e5;
    color: #4f46e5;
}

/* ===== 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 #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    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 #e2e8f0;
    border-radius: 8px;
    background: white;
    padding: 8px;
}

.custom-icon-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* ===== Sort cell στις κατηγορίες ===== */
.sort-cell {
    display: flex;
    align-items: center;
    gap: 4px;
}

.sort-number {
    min-width: 32px;
    text-align: center;
    color: #64748b;
    font-weight: 600;
}

/* Logout button μέσα σε form (να μοιάζει με MudMenuItem) */
.logout-menu-wrapper {
    width: 100%;
}

.logout-menu-button {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 8px 16px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--mud-palette-error);
    font-size: 0.875rem;
    font-family: inherit;
    text-align: left;
    transition: background-color 0.15s ease;
}

    .logout-menu-button:hover {
        background-color: var(--mud-palette-action-default-hover);
    }

    .logout-menu-button:focus {
        outline: none;
        background-color: var(--mud-palette-action-default-hover);
    }

/* Όνομα χρήστη στο header - truncate αν είναι μεγάλο */
.user-button-name {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}