/* =========================================
   DASHBOARD HARW - MAIN STYLES
   ========================================= */

/* 1. GLOBAL RESET (CRITIC PENTRU LOGIN) */
html, body {
    margin: 0 !important;
    padding: 0 !important;
    height: 100% !important;
    width: 100% !important;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: #f0f2f5; /* Fundal default aplicatie */
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Previne scroll orizontal accidental */
}

:root {
    --bg-app: #f0f2f5;
    --bg-card: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary: #3b82f6;
    --primary-soft: #eff6ff;
    --border-light: #e2e8f0;
    
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.02);
    
    --radius-l: 16px;
    --radius-m: 12px;
    --radius-s: 8px;
    
    --sidebar-w: 260px;
    --topbar-h: 64px;
    --transition: all 0.2s ease-in-out;

    /* CULORI ACTIUNI */
    --btn-view: #3b82f6;
    --btn-edit: #f59e0b;
    --btn-del: #ef4444;
}

* { box-sizing: border-box; outline: none; }

/* =========================================
   LAYOUT DASHBOARD (Cand esti logat)
   ========================================= */

#dharw-app {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* --- SIDEBAR --- */
#dharw-sidebar {
    width: var(--sidebar-w);
    background: var(--bg-card);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    z-index: 20;
    transition: var(--transition);
}

.dc-sb-header {
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    padding: 0 24px;
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
    border-bottom: 1px solid var(--border-light);
    letter-spacing: -0.5px;
}

.dc-sb-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

/* Grupuri Meniu */
.dc-group { margin-bottom: 8px; }

.dc-group-title {
    padding: 10px 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--radius-s);
}
.dc-group-title:hover { background-color: var(--primary-soft); color: var(--primary); }

.dc-group-body { padding-left: 0; display: none; }
.dc-group[aria-expanded="true"] .dc-group-body { display: block; animation: fadeIn 0.3s ease; }

/* Item Meniu */
.dc-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    margin: 2px 0;
    border-radius: var(--radius-m);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: var(--transition);
}

.dc-item:hover { background-color: var(--bg-app); color: var(--text-main); }
.dc-item.active {
    background-color: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}
.dc-item.active .dc-icon { opacity: 1; }

.dc-subwrap { padding-left: 12px; border-left: 2px solid var(--border-light); margin-left: 22px; margin-top: 4px; }
.dc-sub { font-size: 13px; padding: 8px 12px; }

.dc-arrow { width: 16px; height: 16px; transition: transform 0.2s; fill: currentColor; opacity: 0.5; }

/* --- MAIN CONTENT AREA --- */
.dc-main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; 
}

/* Topbar */
#dharw-topbar {
    height: var(--topbar-h);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.dc-breadcrumbs { font-size: 14px; color: var(--text-muted); }
.dc-user-profile { display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; }
.dc-avatar {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    color: white; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
}

/* Main Canvas */
#dharw-main {
    flex: 1;
    padding: 32px;
    overflow-y: auto;
}

/* Card Style */
.dc-card {
    background: var(--bg-card);
    border-radius: var(--radius-l);
    box-shadow: var(--shadow-card);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid rgba(255,255,255,0.5);
}
.dc-card h2 { margin-top: 0; font-size: 20px; color: var(--text-main); }

/* Empty State */
.dc-empty {
    height: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--text-muted); opacity: 0.6;
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes dcFadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }


/* ==========================================================================
   TABELS, BUTTONS, MODALS
   ========================================================================== */

/* --- TABLE STYLES --- */
.dc-table-wrapper {
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-m);
    box-shadow: var(--shadow-soft);
    margin-top: 20px;
    overflow-x: auto;
}

.dc-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.dc-table th {
    background: #f8fafc;
    color: var(--text-muted);
    font-weight: 700;
    text-align: left;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-light);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dc-table td {
    padding: 14px 20px;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-main);
    vertical-align: middle;
    font-size: 14px;
}

.dc-table tr:last-child td { border-bottom: none; }
.dc-table tr:hover td { background-color: #f8fafc; }

/* --- BADGES (Roluri) --- */
.dc-badge {
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.dc-badge.administrator { background: #dbeafe; color: #1e40af; }
.dc-badge.manager { background: #dcfce7; color: #166534; }
.dc-badge.hr { background: #fdf4ff; color: #a21caf; }
.dc-badge.operator { background: #f1f5f9; color: #475569; }
.dc-badge.visitor { background: #f3f4f6; color: #4b5563; }

/* --- ACTION BUTTONS (Vizibilitate Fixata) --- */
.dc-actions {
    display: flex;
    gap: 6px;
    justify-content: flex-end;
}

.dc-btn-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: var(--text-muted); /* Culoare default iconita */
}

/* IMPORTANT: Asiguram ca SVG-ul se vede */
.dc-btn-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
}

/* Hover Colors */
.dc-btn-icon:hover { background: #fff; border-color: #cbd5e1; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.dc-btn-icon.view:hover { color: var(--btn-view); background: #eff6ff; border-color: #dbeafe; }
.dc-btn-icon.edit:hover { color: var(--btn-edit); background: #fffbeb; border-color: #fcd34d; }
.dc-btn-icon.delete:hover { color: var(--btn-del); background: #fef2f2; border-color: #fecaca; }

/* --- MODAL (Z-Index Fixat) --- */
.dc-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(5px);
    
    /* FIX CRITIC: Z-index mai mare decat fundalul dashboard-ului */
    z-index: 2147483650 !important;
    
    display: none; 
    align-items: center; 
    justify-content: center;
}

.dc-modal-overlay.open {
    display: flex !important;
    animation: dcFadeIn 0.2s ease-out;
}

.dc-modal {
    background: #fff;
    width: 90%; max-width: 480px;
    border-radius: var(--radius-l);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 30px;
    position: relative;
    border: 1px solid #e2e8f0;
}

.dc-form-group { margin-bottom: 20px; }
.dc-form-label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; color: #334155; }
.dc-input {
    width: 100%; padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px; font-size: 15px; color: #0f172a;
    transition: border 0.2s;
}
.dc-input:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2); }

.dc-modal-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    display: flex; justify-content: flex-end; gap: 12px;
}


/* =========================================
   FUTURISTIC LOGIN PAGE (STILURILE COMPLETE)
   ========================================= */

.dc-login-container {
    height: 100vh; /* Ocupa tot ecranul */
    width: 100vw;  
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #0f172a; /* Dark Blue */
    position: fixed; /* Fixat sa nu faca scroll */
    top: 0;
    left: 0;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    z-index: 99999; /* Peste orice altceva din WP */
}

/* Background Effect */
.dc-login-bg {
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(37, 99, 235, 0.15), transparent 60%);
    top: -50%; left: -50%;
    z-index: 0;
    animation: pulseBg 10s infinite alternate;
}

@keyframes pulseBg {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.1); opacity: 1; }
}

/* Login Card Style */
.dc-login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    width: 100%;
    max-width: 420px;
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 10;
    position: relative;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.1);
}

.dc-login-logo img {
    height: 40px;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.dc-login-intro h1 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #1e293b;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.dc-login-intro p {
    margin: 0 0 30px;
    color: #64748b;
    font-size: 14px;
}

.dc-input-group {
    text-align: left;
    margin-bottom: 20px;
}

.dc-input-group label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.dc-input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    color: #0f172a;
    transition: all 0.2s ease;
    background: #f8fafc;
    outline: none;
}

.dc-input-group input:focus {
    border-color: #3b82f6;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.dc-btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.dc-btn-login:hover {
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.dc-btn-login:active {
    transform: translateY(0);
}

.dc-login-footer {
    margin-top: 30px;
    font-size: 11px;
    color: #94a3b8;
    border-top: 1px solid #f1f5f9;
    padding-top: 15px;
}

.dc-link-back {
    display: inline-block;
    margin-top: 20px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
.dc-link-back:hover { text-decoration: underline; }