/* ================================================================
   NOR INVEST - Stiluri aplicatie v2
   ================================================================ */

:root {
    --primary: #5a9fd4;
    --primary-light: #7dbce6;
    --primary-dark: #4a86b8;
    --text: #2c4a63;
    --text-light: #6b7d8f;
    --text-muted: #8aa3b8;
    --bg: #eef2f6;
    --bg-card: #ffffff;
    --bg-soft: #f5f8fb;
    --border: rgba(203,213,222,0.5);
    --border-soft: rgba(203,213,222,0.3);
    --success: #5a9d78;
    --success-bg: rgba(134,194,154,0.15);
    --warning: #d49c3d;
    --warning-bg: rgba(218,180,130,0.18);
    --danger: #c74545;
    --danger-bg: rgba(228,130,130,0.15);
    --shadow-sm: 0 1px 3px rgba(120,160,200,0.08);
    --shadow: 0 4px 12px rgba(120,160,200,0.12);
    --shadow-lg: 0 10px 40px rgba(120,160,200,0.15);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overscroll-behavior: none; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #eef2f6 0%, #e6edf3 50%, #dde6ee 100%);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

input, button, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--primary); text-decoration: none; }

/* APP CONTAINER - full screen pe mobil, centrat pe desktop */
#app {
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: white;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

/* ================================================================
   LOGIN SCREEN
   ================================================================ */
.login-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 3em 2em 2em;
}
.login-top { display: flex; flex-direction: column; align-items: center; margin-top: 2em; }
.login-logo { width: 180px; }
.login-tag {
    color: var(--text-muted); letter-spacing: 0.3em; text-transform: uppercase;
    font-size: 0.75em; margin-top: 1.5em;
}
.login-middle { display: flex; flex-direction: column; align-items: center; width: 100%; }
.login-prompt { color: var(--text-light); font-size: 0.9em; margin-bottom: 1em; }
.pin-display { display: flex; gap: 1em; margin: 0.5em 0 1.5em; }
.pin-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid #cbd5de; transition: all 0.2s; }
.pin-dot.filled {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    border: none; box-shadow: 0 2px 8px rgba(125,188,230,0.4);
}
.error-msg { color: var(--danger); font-size: 0.85em; min-height: 1.5em; text-align: center; }
.shake { animation: shake 0.4s; }
@keyframes shake { 0%,100%{transform:translateX(0);} 25%{transform:translateX(-8px);} 75%{transform:translateX(8px);} }

.login-bottom { width: 100%; max-width: 300px; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75em; }
.key {
    height: 64px; background: rgba(255,255,255,0.6);
    color: var(--text); border: 1px solid rgba(203,213,222,0.4);
    border-radius: 16px; font-size: 1.5em; font-weight: 300;
    transition: all 0.15s;
}
.key:active { transform: scale(0.95); background: #f0f4f8; }
.key.spacer { background: transparent; border: none; cursor: default; }
.key.back { color: var(--text-muted); font-size: 1.2em; }

.login-hint {
    margin-top: 1.5em; color: var(--text-muted); font-size: 0.75em;
    text-align: center; max-width: 280px; line-height: 1.5;
}

/* ================================================================
   HEADER (interior app)
   ================================================================ */
.header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.5em 1.5em 1em;
    border-bottom: 1px solid var(--border-soft);
    position: sticky; top: 0; background: white; z-index: 10;
}
.header-user { display: flex; align-items: center; gap: 0.75em; }
.avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 600; font-size: 0.95em;
    box-shadow: 0 2px 8px rgba(90,159,212,0.3);
    flex-shrink: 0;
}
.header-info { display: flex; flex-direction: column; min-width: 0; }
.header-name { font-weight: 500; font-size: 0.95em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.header-role { font-size: 0.75em; color: var(--text-muted); }
.header-actions { display: flex; gap: 0.5em; }
.icon-btn {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); transition: background 0.15s;
}
.icon-btn:hover { background: var(--bg-soft); }
.icon-btn svg { width: 20px; height: 20px; }

.back-btn {
    display: flex; align-items: center; gap: 0.4em;
    color: var(--primary); font-size: 0.9em;
    padding: 0.5em 0.8em 0.5em 0; margin-bottom: 0.5em;
}
.back-btn:active { opacity: 0.6; }
.back-btn svg { width: 18px; height: 18px; }

/* ================================================================
   PAGE CONTENT
   ================================================================ */
.page {
    flex: 1; padding: 1.5em; overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.page-title {
    font-size: 1.5em; font-weight: 600; color: #1e3a52;
    margin-bottom: 0.3em;
}
.page-subtitle { color: var(--text-light); font-size: 0.9em; margin-bottom: 1.5em; text-transform: capitalize; }
.section-title { font-size: 0.85em; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; margin: 1.5em 0 0.75em; font-weight: 500; }
.section-title:first-child { margin-top: 0; }

/* ================================================================
   CARDS (pe lista)
   ================================================================ */
.card {
    background: white; border: 1px solid var(--border-soft);
    border-radius: 14px; padding: 1em; margin-bottom: 0.75em;
    box-shadow: var(--shadow-sm); transition: all 0.15s;
}
.card:active { transform: scale(0.99); }
.card-clickable { cursor: pointer; }
.card-clickable:hover { box-shadow: var(--shadow); }
.card-title { font-weight: 600; font-size: 0.95em; margin-bottom: 0.3em; color: #1e3a52; }
.card-subtitle { font-size: 0.8em; color: var(--text-light); margin-bottom: 0.5em; }
.card-meta { display: flex; flex-wrap: wrap; gap: 0.5em; margin-top: 0.5em; }
.chip {
    font-size: 0.7em; padding: 0.25em 0.6em; border-radius: 999px;
    background: var(--bg-soft); color: var(--text-light);
    text-transform: uppercase; letter-spacing: 0.05em; font-weight: 500;
}
.chip-primary { background: rgba(125,188,230,0.15); color: var(--primary); }
.chip-success { background: var(--success-bg); color: var(--success); }
.chip-warning { background: var(--warning-bg); color: var(--warning); }
.chip-danger { background: var(--danger-bg); color: var(--danger); }

/* Progress bar */
.progress-container { background: var(--bg-soft); height: 6px; border-radius: 3px; overflow: hidden; margin-top: 0.5em; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--primary-light), var(--primary)); transition: width 0.3s; }

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
    padding: 0.75em 1.2em; border-radius: 12px;
    font-weight: 500; font-size: 0.95em;
    transition: all 0.15s;
    white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white; box-shadow: 0 2px 8px rgba(90,159,212,0.25);
}
.btn-secondary { background: var(--bg-soft); color: var(--text); border: 1px solid var(--border-soft); }
.btn-danger { background: var(--danger-bg); color: var(--danger); }
.btn-success { background: var(--success-bg); color: var(--success); }
.btn-full { width: 100%; }
.btn-sm { padding: 0.5em 0.9em; font-size: 0.85em; }
.btn-lg { padding: 1em 1.5em; font-size: 1em; }
.btn-xl { padding: 1.3em 2em; font-size: 1.1em; font-weight: 600; }

/* FAB */
.fab {
    position: fixed; bottom: 1.5em; right: 50%; transform: translateX(50%);
    margin-right: -200px;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    box-shadow: 0 4px 16px rgba(90,159,212,0.4);
    display: flex; align-items: center; justify-content: center;
    z-index: 20;
}
.fab svg { width: 24px; height: 24px; }
@media (max-width: 480px) {
    .fab { right: 1.5em; transform: none; margin-right: 0; }
}

/* ================================================================
   FORM ELEMENTS
   ================================================================ */
.form-group { margin-bottom: 1em; }
.form-label {
    display: block; font-size: 0.8em; color: var(--text-light);
    margin-bottom: 0.4em; font-weight: 500;
}
.form-label-required::after { content: ' *'; color: var(--danger); }
.form-control {
    width: 100%; padding: 0.8em 1em;
    background: var(--bg-soft); border: 1px solid var(--border-soft);
    border-radius: 10px; font-size: 0.95em; color: var(--text);
    outline: none; transition: all 0.15s;
}
.form-control:focus { border-color: var(--primary); background: white; box-shadow: 0 0 0 3px rgba(90,159,212,0.1); }
.form-control-sm { padding: 0.5em 0.8em; font-size: 0.85em; }
textarea.form-control { min-height: 80px; resize: vertical; font-family: inherit; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.8em; }
.form-hint { font-size: 0.75em; color: var(--text-muted); margin-top: 0.3em; }

/* ================================================================
   TABS
   ================================================================ */
.tabs {
    display: flex; gap: 0.3em; margin-bottom: 1em;
    border-bottom: 1px solid var(--border-soft);
    overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
    padding: 0.7em 1em;
    color: var(--text-light); font-size: 0.85em; font-weight: 500;
    border-bottom: 2px solid transparent;
    transition: all 0.15s; white-space: nowrap;
}
.tab.active { color: var(--primary); border-color: var(--primary); }

/* ================================================================
   MODAL
   ================================================================ */
.modal-backdrop {
    position: fixed; inset: 0;
    background: rgba(30, 58, 82, 0.5);
    display: flex; align-items: flex-end; justify-content: center;
    z-index: 100; animation: fadeIn 0.2s;
    backdrop-filter: blur(2px);
}
.modal {
    background: white; width: 100%; max-width: 480px; max-height: 90vh;
    border-radius: 20px 20px 0 0;
    padding: 1.5em;
    overflow-y: auto; animation: slideUp 0.25s;
    box-shadow: 0 -10px 40px rgba(30,58,82,0.2);
}
@media (min-width: 480px) {
    .modal-backdrop { align-items: center; }
    .modal { border-radius: 20px; margin: 0 1em; max-height: 85vh; }
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 1em;
}
.modal-title { font-size: 1.15em; font-weight: 600; color: #1e3a52; }
.modal-close {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--bg-soft); color: var(--text-muted);
    display: flex; align-items: center; justify-content: center;
}
.modal-actions { display: flex; gap: 0.5em; margin-top: 1.5em; }
.modal-actions .btn { flex: 1; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

/* ================================================================
   TOAST
   ================================================================ */
#toast-root {
    position: fixed; bottom: 2em; left: 50%; transform: translateX(-50%);
    z-index: 200; pointer-events: none;
}
.toast {
    padding: 0.9em 1.4em; border-radius: 12px;
    background: rgba(30,58,82,0.92); color: white;
    font-size: 0.9em; font-weight: 500;
    box-shadow: 0 8px 24px rgba(30,58,82,0.25);
    animation: toastIn 0.25s; margin-bottom: 0.5em;
    backdrop-filter: blur(10px);
    max-width: 90vw;
}
.toast-success { background: rgba(90,157,120,0.95); }
.toast-error { background: rgba(199,69,69,0.95); }
.toast-warning { background: rgba(212,156,61,0.95); }
@keyframes toastIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* ================================================================
   DASHBOARD
   ================================================================ */
.dashboard-greeting { font-size: 1.5em; font-weight: 600; color: #1e3a52; margin-bottom: 0.2em; }
.dashboard-date { color: var(--text-light); font-size: 0.9em; text-transform: capitalize; margin-bottom: 1.5em; }

.dashboard-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75em; margin-bottom: 1.5em; }
.stat-card {
    padding: 1em; border-radius: 14px;
    background: linear-gradient(135deg, rgba(125,188,230,0.08), rgba(90,159,212,0.04));
    border: 1px solid rgba(125,188,230,0.2);
}
.stat-label { font-size: 0.75em; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 0.3em; }
.stat-value { font-size: 1.5em; font-weight: 600; color: var(--primary-dark); line-height: 1.1; }
.stat-unit { font-size: 0.7em; color: var(--text-light); margin-left: 0.3em; font-weight: 400; }

.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75em; }
.menu-card {
    padding: 1.2em 1em;
    background: white; border: 1px solid var(--border-soft);
    border-radius: 16px; box-shadow: var(--shadow-sm);
    text-align: center; transition: all 0.15s;
    cursor: pointer;
}
.menu-card:active { transform: scale(0.98); }
.menu-icon {
    width: 48px; height: 48px; margin: 0 auto 0.75em;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(125,188,230,0.15), rgba(90,159,212,0.1));
    display: flex; align-items: center; justify-content: center;
}
.menu-icon svg { width: 24px; height: 24px; color: var(--primary); }
.menu-name { font-weight: 500; font-size: 0.9em; color: var(--text); }
.menu-count { font-size: 0.75em; color: var(--text-muted); margin-top: 0.2em; }
.menu-badge {
    position: relative;
}
.menu-badge::after {
    content: ''; position: absolute;
    top: 0.6em; right: 0.6em;
    width: 10px; height: 10px;
    background: var(--danger); border-radius: 50%;
    box-shadow: 0 0 0 2px white;
}

/* ================================================================
   PONTAJE - buton mare START/STOP
   ================================================================ */
.pontaj-status {
    padding: 2em 1.5em; margin-bottom: 1em;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(134,194,154,0.1), rgba(90,157,120,0.05));
    border: 1px solid rgba(134,194,154,0.3);
    text-align: center;
}
.pontaj-status.inactive {
    background: linear-gradient(135deg, rgba(203,213,222,0.2), rgba(175,189,203,0.1));
    border-color: var(--border);
}
.pontaj-timer { font-size: 2.5em; font-weight: 300; color: var(--text); margin: 0.3em 0; letter-spacing: 0.05em; }
.pontaj-label { font-size: 0.85em; color: var(--text-light); margin-bottom: 0.5em; }
.pontaj-lucrare { font-size: 1em; font-weight: 500; color: #1e3a52; margin-top: 0.5em; }
.pontaj-location { font-size: 0.8em; color: var(--text-muted); margin-top: 0.3em; }

.pontaj-big-btn {
    display: block; width: 100%;
    padding: 1.5em;
    border-radius: 16px;
    font-size: 1.15em; font-weight: 600;
    letter-spacing: 0.05em; text-transform: uppercase;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    margin: 1em 0;
}
.pontaj-btn-start {
    background: linear-gradient(135deg, #86c29a, #5a9d78); color: white;
}
.pontaj-btn-stop {
    background: linear-gradient(135deg, #e48282, #c74545); color: white;
}

/* ================================================================
   GALERIE POZE
   ================================================================ */
.gallery { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.5em; }
.gallery-item {
    aspect-ratio: 1; background: var(--bg-soft);
    border-radius: 10px; overflow: hidden;
    position: relative; cursor: pointer;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-empty {
    aspect-ratio: 1; background: var(--bg-soft);
    border: 2px dashed var(--border); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); cursor: pointer;
}
.gallery-empty svg { width: 28px; height: 28px; }

/* ================================================================
   UTILE
   ================================================================ */
.empty-state {
    text-align: center; padding: 3em 1em;
    color: var(--text-muted);
}
.empty-state svg { width: 48px; height: 48px; opacity: 0.4; margin-bottom: 1em; }
.empty-state p { font-size: 0.9em; }

.loading {
    display: flex; align-items: center; justify-content: center;
    padding: 3em; color: var(--text-muted);
}
.spinner {
    width: 32px; height: 32px; border-radius: 50%;
    border: 3px solid var(--bg-soft);
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.row-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 0.7em 0; border-bottom: 1px solid var(--border-soft);
}
.row-item:last-child { border-bottom: none; }
.row-label { color: var(--text-light); font-size: 0.85em; }
.row-value { font-weight: 500; font-size: 0.9em; text-align: right; }

.divider { height: 1px; background: var(--border-soft); margin: 1em 0; }

.text-muted { color: var(--text-muted); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-small { font-size: 0.85em; }
.text-lg { font-size: 1.1em; }
.text-bold { font-weight: 600; }
.mb-1 { margin-bottom: 0.5em; }
.mb-2 { margin-bottom: 1em; }
.mb-3 { margin-bottom: 1.5em; }
.mt-1 { margin-top: 0.5em; }
.mt-2 { margin-top: 1em; }
.mt-3 { margin-top: 1.5em; }
.gap-1 { gap: 0.5em; }
.gap-2 { gap: 1em; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.hidden { display: none !important; }

/* Logo SVG generic folosit in mai multe locuri */
.logo-nor {
    display: inline-block;
    font-family: 'Inter', sans-serif;
}

/* ============================================================
   v3 - Stiluri noi
   ============================================================ */

/* GPS - iframe container */
.gps-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 56px);
    background: #fff;
}
.gps-info-bar {
    padding: 10px 14px;
    background: #f8fafc;
    border-bottom: 1px solid var(--border-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.gps-info-text {
    font-size: 0.88em;
    color: var(--text);
}
.gps-iframe {
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
}

/* Document cards */
.doc-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    margin-bottom: 10px;
    gap: 12px;
    transition: background 0.15s;
}
.doc-item:hover {
    background: #f9fafb;
}
.doc-icon {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, rgba(125,188,230,0.15), rgba(90,159,212,0.1));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    flex-shrink: 0;
}
.doc-icon svg {
    width: 22px;
    height: 22px;
}
.doc-info {
    flex: 1;
    min-width: 0;
}
.doc-name {
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.95em;
}
.doc-meta {
    font-size: 0.8em;
    color: var(--text-muted);
    margin-top: 2px;
}
.doc-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

/* Jurnal activitati */
.jurnal-item {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-left: 4px solid var(--primary);
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: box-shadow 0.15s;
}
.jurnal-item:hover {
    box-shadow: 0 3px 10px rgba(44,74,99,0.08);
}
.jurnal-data {
    font-size: 0.85em;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}
.jurnal-preview {
    font-size: 0.92em;
    color: var(--text);
    line-height: 1.4;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Card clickable general */
.card-clickable {
    cursor: pointer;
    transition: box-shadow 0.15s, transform 0.1s;
}
.card-clickable:hover {
    box-shadow: 0 4px 14px rgba(44,74,99,0.1);
}
.card-clickable:active {
    transform: scale(0.99);
}

/* Flex helpers suplimentari */
.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.flex-align-start {
    align-items: flex-start !important;
}

/* Buton small */
.btn-small {
    padding: 6px 12px !important;
    font-size: 0.85em !important;
    min-height: auto !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-small svg {
    width: 14px;
    height: 14px;
}

/* Card cu title/subtitle/meta */
.card-title {
    font-weight: 600;
    font-size: 1em;
    color: var(--text);
    margin-bottom: 2px;
}
.card-subtitle {
    font-size: 0.88em;
    color: var(--text-muted);
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85em;
    color: var(--text-muted);
    margin-top: 6px;
}

/* Detail row (key-value in detail views) */
.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-soft);
    gap: 10px;
    font-size: 0.92em;
}
.detail-row:last-child {
    border-bottom: none;
}
.detail-label {
    color: var(--text-muted);
    flex-shrink: 0;
}

/* Upload drop zone */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: 10px;
    padding: 24px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.15s;
    background: #fafbfc;
}
.upload-zone:hover, .upload-zone.drag-over {
    border-color: var(--primary);
    background: rgba(125,188,230,0.05);
}
.upload-zone svg {
    width: 36px;
    height: 36px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.upload-zone-text {
    color: var(--text);
    font-weight: 500;
    margin-bottom: 4px;
}
.upload-zone-hint {
    font-size: 0.85em;
    color: var(--text-muted);
}


/* Modal body - wrapper pentru continut scroll-abil */
.modal-body {
    /* folosit in modale cu mult continut (formulare) - nu are inca limitari specifice */
}
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 1em;
    padding-top: 1em;
    border-top: 1px solid var(--border-soft);
    justify-content: flex-end;
}
.modal-actions .btn {
    flex: 0 0 auto;
}
@media (max-width: 479px) {
    .modal-actions .btn {
        flex: 1 1 auto;
    }
}

/* ============================================================
   v4 - Dashboard "Cards 3D Soft" + Chat
   ============================================================ */

/* Dashboard - NEW */
.dash-top {
    background: white;
    padding: 44px 20px 24px;
    border-radius: 0 0 28px 28px;
    box-shadow: 0 4px 20px rgba(44,74,99,0.04);
    margin-bottom: 20px;
}
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}
.dash-user {
    display: flex;
    gap: 12px;
    align-items: center;
    flex: 1;
    min-width: 0;
}
.dash-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #5a9fd4, #7dbce6);
    color: white;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(90,159,212,0.25);
    flex-shrink: 0;
}
.dash-user-info {
    min-width: 0;
}
.dash-hi {
    font-size: 0.82em;
    color: var(--text-muted);
    line-height: 1.2;
}
.dash-who {
    font-weight: 600;
    color: var(--text);
    font-size: 1em;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-role-dot {
    color: var(--text-muted);
    margin: 0 2px;
}
.dash-role {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.9em;
}
.dash-header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.dash-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #f4f7fb;
    border: none;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
}
.dash-icon-btn:hover {
    background: #e8eef5;
}
.dash-icon-btn svg {
    width: 20px;
    height: 20px;
}

/* Banner - default cu ore lucrate */
.dash-banner {
    background: linear-gradient(120deg, #2c4a63 0%, #4a86b8 100%);
    border-radius: 18px;
    padding: 20px;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(44,74,99,0.15);
}
.dash-banner::after {
    content: '';
    position: absolute;
    right: -30px; top: -30px;
    width: 120px; height: 120px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}
.dash-banner-default {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.banner-content {
    position: relative;
    z-index: 1;
    flex: 1;
}
.banner-label {
    font-size: 0.85em;
    opacity: 0.85;
    margin-bottom: 4px;
}
.banner-value {
    font-size: 1.9em;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.banner-value-suffix {
    font-size: 0.5em;
    opacity: 0.8;
    font-weight: 500;
}
.banner-meta {
    font-size: 0.82em;
    opacity: 0.85;
    margin-top: 6px;
}
.banner-icon {
    width: 44px;
    height: 44px;
    opacity: 0.5;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Banner - pontaj activ */
.dash-banner-active {
    background: linear-gradient(120deg, #5a9d78 0%, #86c29a 100%);
    box-shadow: 0 6px 20px rgba(90,157,120,0.3);
}
.banner-active-badge {
    font-size: 0.75em;
    opacity: 0.9;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}
.banner-active-lucrare {
    font-size: 1.1em;
    font-weight: 600;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}
.banner-active-time {
    font-size: 0.88em;
    opacity: 0.9;
    margin-top: 4px;
    position: relative;
    z-index: 1;
}
.banner-active-btn {
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 10px;
    padding: 8px 14px;
    font-size: 0.88em;
    font-weight: 500;
    cursor: pointer;
    margin-top: 10px;
    position: relative;
    z-index: 1;
    backdrop-filter: blur(10px);
}

/* Banner chat */
.dash-chat-banner {
    background: white;
    border: 1px solid #eef2f6;
    border-radius: 18px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(44,74,99,0.06);
}
.chat-banner-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}
.chat-banner-title {
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95em;
}
.chat-banner-badge {
    background: #c74545;
    color: white;
    border-radius: 10px;
    padding: 2px 8px;
    font-size: 0.75em;
    font-weight: 700;
}
.chat-banner-expand {
    background: transparent;
    border: none;
    color: var(--primary);
    font-size: 0.85em;
    font-weight: 500;
    cursor: pointer;
}
.chat-banner-preview {
    min-height: 40px;
    max-height: 80px;
    overflow: hidden;
    font-size: 0.88em;
    color: var(--text);
    line-height: 1.4;
    padding: 4px 0 8px;
    border-bottom: 1px solid #eef2f6;
    margin-bottom: 10px;
}
.chat-banner-msg {
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-banner-msg strong {
    color: var(--primary);
    font-weight: 600;
}
.chat-banner-msg em {
    color: var(--text-muted);
    font-style: normal;
    font-weight: 500;
}
.chat-banner-empty {
    color: var(--text-muted);
    font-style: italic;
    text-align: center;
    padding: 8px;
}
.chat-banner-input {
    display: flex;
    gap: 8px;
    align-items: center;
}
.chat-banner-input input {
    flex: 1;
    border: 1px solid #e8ecf1;
    border-radius: 20px;
    padding: 9px 14px;
    font-family: inherit;
    font-size: 0.9em;
    background: #f9fafb;
}
.chat-banner-input input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}
.chat-banner-input button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s;
}
.chat-banner-input button:hover {
    background: var(--primary-dark);
}
.chat-banner-input button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.dash-chat-banner-err {
    background: #fdf0f0;
    color: #8b2020;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 0.85em;
}

/* Dashboard body */
.dash-body {
    padding: 0 20px 30px;
}
.dash-section-title {
    font-size: 0.75em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
    margin-bottom: 14px;
    padding-left: 4px;
}
.dash-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.dash-card {
    border-radius: 20px;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 2px 12px rgba(44,74,99,0.06);
    transition: all 0.2s;
    cursor: pointer;
    position: relative;
    min-height: 110px;
    background: white;
}
.dash-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44,74,99,0.1);
}
.dash-card:active {
    transform: translateY(0);
}
.dash-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}
.dash-card-icon svg {
    width: 24px;
    height: 24px;
    stroke-width: 2;
}
.dash-card-name {
    font-size: 1em;
    font-weight: 600;
    color: var(--text);
}
.dash-card-badge {
    position: absolute;
    top: 14px; right: 14px;
    min-width: 22px;
    height: 22px;
    border-radius: 11px;
    background: #c74545;
    color: white;
    font-size: 0.75em;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 7px;
    box-shadow: 0 2px 6px rgba(199,69,69,0.35);
}

/* Culori cartonase - gradient subtil */
.dash-card-lucrari { background: linear-gradient(135deg, #eaf3fb, #ffffff 70%); }
.dash-card-lucrari .dash-card-icon { background: #5a9fd4; }
.dash-card-pontaje { background: linear-gradient(135deg, #e9f4ed, #ffffff 70%); }
.dash-card-pontaje .dash-card-icon { background: #5a9d78; }
.dash-card-utilaje { background: linear-gradient(135deg, #f4eee2, #ffffff 70%); }
.dash-card-utilaje .dash-card-icon { background: #d49c3d; }
.dash-card-combust { background: linear-gradient(135deg, #ece2f4, #ffffff 70%); }
.dash-card-combust .dash-card-icon { background: #8b6fb8; }
.dash-card-licit { background: linear-gradient(135deg, #fde6e6, #ffffff 70%); }
.dash-card-licit .dash-card-icon { background: #c74545; }
.dash-card-rap { background: linear-gradient(135deg, #e0eff5, #ffffff 70%); }
.dash-card-rap .dash-card-icon { background: #4a86b8; }
.dash-card-users { background: linear-gradient(135deg, #f0ece7, #ffffff 70%); }
.dash-card-users .dash-card-icon { background: #7a6a5a; }

/* ============================================================
   CHAT - ecran complet
   ============================================================ */
.chat-page {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 56px);
    background: #f4f7fb;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.chat-date-sep {
    text-align: center;
    font-size: 0.78em;
    color: var(--text-muted);
    margin: 12px 0 6px;
    padding: 4px 12px;
    background: rgba(255,255,255,0.7);
    border-radius: 10px;
    align-self: center;
    backdrop-filter: blur(4px);
}
.chat-row {
    display: flex;
    margin-bottom: 2px;
}
.chat-row-mine {
    justify-content: flex-end;
}
.chat-bubble {
    max-width: 75%;
    padding: 8px 12px;
    border-radius: 16px;
    position: relative;
    word-wrap: break-word;
    box-shadow: 0 1px 3px rgba(44,74,99,0.06);
}
.chat-bubble-theirs {
    background: white;
    color: var(--text);
    border-bottom-left-radius: 4px;
}
.chat-bubble-mine {
    background: linear-gradient(135deg, #5a9fd4, #7dbce6);
    color: white;
    border-bottom-right-radius: 4px;
}
.chat-sender {
    font-size: 0.78em;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.chat-role-badge {
    font-size: 0.85em;
    font-weight: 400;
    color: var(--text-muted);
    background: #f4f7fb;
    padding: 1px 8px;
    border-radius: 8px;
}
.chat-text {
    font-size: 0.95em;
    line-height: 1.4;
    white-space: pre-wrap;
}
.chat-time {
    font-size: 0.7em;
    opacity: 0.7;
    text-align: right;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}
.chat-bubble-mine .chat-time {
    color: rgba(255,255,255,0.85);
}
.chat-del-btn {
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    font-size: 1.1em;
    line-height: 1;
    padding: 0 2px;
}
.chat-del-btn:hover { opacity: 1; }

.chat-img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
    display: block;
    margin-bottom: 4px;
    cursor: pointer;
}
.chat-caption {
    font-size: 0.9em;
    margin-top: 2px;
}

.chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}
.chat-empty-icon {
    font-size: 3em;
    margin-bottom: 10px;
    opacity: 0.5;
}
.chat-empty-text {
    font-size: 1.05em;
    font-weight: 500;
    margin-bottom: 4px;
}
.chat-empty-hint {
    font-size: 0.85em;
}

.chat-input-bar {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: white;
    border-top: 1px solid #eef2f6;
    align-items: center;
}
.chat-attach {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f4f7fb;
    border: none;
    color: var(--text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.chat-attach:hover {
    background: #e8eef5;
}
.chat-attach svg {
    width: 20px;
    height: 20px;
}
.chat-input {
    flex: 1;
    border: 1px solid #e8ecf1;
    border-radius: 22px;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 0.95em;
    background: #f9fafb;
}
.chat-input:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
}
.chat-send {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
}
.chat-send:hover { background: var(--primary-dark); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

.chat-img-viewer {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: zoom-out;
}
.chat-img-viewer img {
    max-width: 95vw;
    max-height: 95vh;
}
.chat-img-close {
    position: absolute;
    top: 20px; right: 20px;
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: white;
    border: none;
    font-size: 1.8em;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

/* ============================================================
   v4.3.1 - SOLICITARI - stil simplificat
   De adaugat la SFARSITUL fisierului /app.css
   ============================================================ */

/* Buton mare adaugare pe pagina lucrare */
.sol-btn-adauga {
    margin-bottom: 12px;
    padding: 14px;
    font-size: 1em;
    font-weight: 600;
}

/* Widget cu scroll - lista solicitari pe lucrare */
.sol-widget-scroll {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: 8px;
    background: #fafbfc;
}

.sol-widget-scroll::-webkit-scrollbar {
    width: 6px;
}
.sol-widget-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.sol-widget-scroll::-webkit-scrollbar-thumb {
    background: #c5d2dd;
    border-radius: 3px;
}

.sol-widget-empty {
    text-align: center;
    padding: 30px 20px;
    color: var(--text-muted);
    background: #fafbfc;
    border-radius: 10px;
}

/* Card solicitare in lista */
.sol-card {
    background: white;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
}
.sol-card:hover {
    border-color: var(--primary-light);
    transform: translateX(2px);
}
.sol-card.sol-stadiu-rezolvata {
    opacity: 0.55;
    background: #f7faf8;
}

.sol-head {
    display: flex;
    gap: 10px;
    align-items: center;
}
.sol-priority-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.sol-body {
    flex: 1;
    min-width: 0;
}
.sol-titlu {
    font-weight: 600;
    color: var(--text);
    font-size: 0.92em;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.sol-meta {
    font-size: 0.75em;
    color: var(--text-muted);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.sol-status {
    font-size: 1.2em;
    flex-shrink: 0;
}

/* Detail solicitare */
.sol-status-big {
    font-weight: 600;
    font-size: 0.9em;
    white-space: nowrap;
    flex-shrink: 0;
}
.sol-descriere {
    padding: 12px;
    background: var(--bg);
    border-radius: 8px;
    white-space: pre-wrap;
    margin-bottom: 12px;
    color: var(--text);
}
.sol-info-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.88em;
    color: var(--text);
}
.sol-info-list > div {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-soft);
}
.sol-info-list > div:last-child {
    border-bottom: none;
}
.sol-info-label {
    color: var(--text-muted);
    font-size: 0.9em;
}

/* Comentarii */
.sol-comentariu {
    padding: 8px 10px;
    background: var(--bg);
    border-radius: 8px;
    margin-bottom: 6px;
}
.sol-comentariu-auto {
    background: #f0f4f8;
    font-style: italic;
}
.sol-comentariu-head {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
}
.sol-comentariu-text {
    font-size: 0.88em;
    color: var(--text);
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Termen */
.sol-termen-ok { color: var(--text-muted); }
.sol-termen-aproape { color: var(--warning); font-weight: 600; }
.sol-termen-intarziat { color: var(--danger); font-weight: 600; }

/* BUTOANE MICI JOS - pentru admin/sef_santier */
.sol-admin-actions {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px dashed var(--border);
    text-align: center;
}
.sol-admin-label {
    font-size: 0.7em;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}
.sol-admin-buttons {
    display: flex;
    gap: 6px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-mini {
    padding: 6px 12px;
    font-size: 0.8em;
    border: 1px solid var(--border);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text);
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.btn-mini:hover {
    background: var(--bg);
    border-color: var(--primary);
}
.btn-mini-success {
    border-color: #5a9d78;
    color: #5a9d78;
}
.btn-mini-success:hover {
    background: #e9f4ed;
}
.btn-mini-danger {
    border-color: var(--danger);
    color: var(--danger);
}
.btn-mini-danger:hover {
    background: #fdecea;
}

/* Stats card dashboard */
.sol-stats {
    padding: 14px;
}

/* Card pe dashboard - portocaliu */
.dash-card-sol { background: linear-gradient(135deg, #fff2e0, #ffffff 70%); }
.dash-card-sol .dash-card-icon { background: #e8893a; }
