:root {
    --primary: #0056b3;
    --secondary: #17a2b8;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --purple: #6f42c1;
    --bg: #f8fafc;
    --text: #1e293b;
    --white: #ffffff;
    --border: #e2e8f0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, #0f172a, #1e293b);
    color: var(--white);
    padding: 2.5rem 1rem 4rem;
    text-align: center;
}

header h1 { margin: 0 0 0.5rem; font-size: 2.2rem; }

.container {
    max-width: 1100px;
    margin: -3rem auto 2rem;
    padding: 0 1rem;
    flex: 1;
    position: relative;
    z-index: 10;
}

.grid-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 900px) {
    .grid-layout { grid-template-columns: 1.6fr 1fr; }
}

.card {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid var(--border);
}

.card-header { border-bottom: 2px solid var(--bg); margin-bottom: 1.5rem; padding-bottom: 0.8rem; }
.card-header h2 { font-size: 1.3rem; color: var(--primary); margin:0;}

/* TAB-URI */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border);
    padding-bottom: 0.5rem;
}
.tab-btn {
    flex: 1;
    min-width: 100px;
    background: none;
    border: none;
    padding: 0.8rem 0.5rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.tab-btn:hover { background: #f1f5f9; color: var(--text); }
.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 10px rgba(0,86,179,0.2);
}

.tab-content { position: relative; }
.tab-pane { display: none; animation: fadeIn 0.4s; }
.tab-pane.active { display: block; }

/* FORMULARE */
.form-group { margin-bottom: 1.2rem; }
label { display: block; font-weight: 600; margin-bottom: 0.4rem; font-size: 0.9rem; color: #475569;}
input {
    width: 100%; padding: 0.8rem;
    border: 2px solid var(--border); border-radius: 8px;
    font-size: 1rem; transition: 0.2s; box-sizing: border-box;
}
input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,86,179,0.1); }

/* BUTOANE */
.btn {
    width: 100%; padding: 0.9rem; border: none; border-radius: 8px;
    font-weight: 700; font-size: 1rem; cursor: pointer; transition: 0.3s;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
}
.btn-primary { background: var(--primary); color: white; }
.btn-secondary { background: var(--secondary); color: white; }
.btn-warning { background: var(--warning); color: #000; }
.btn-danger { background: var(--danger); color: white; }
.btn-outline { background: white; border: 2px solid var(--border); color: var(--text); }
.btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.btn-outline:hover { background: var(--bg); border-color: #cbd5e1; filter: none; }

/* REZULTATE GLOBALE (Afișate Sus) */
.global-result {
    margin-bottom: 2rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.result-box {
    padding: 2rem; border-radius: 12px; text-align: center;
}
.result-box h3 { margin: 0 0 0.5rem; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px;}
.big-result { font-size: 3rem; font-weight: 800; margin: 0; line-height: 1.2; }
.sub-result { font-size: 1.1rem; opacity: 0.8; margin-top: 0.5rem; font-weight: 500; }

.result-box.success { background: #28a745; color: white; }
.result-box.info { background: #17a2b8; color: white; }
.result-box.warning { background: #ffc107; color: #000; }
.result-box.primary { background: #6f42c1; color: white; }

/* TABEL */
.table-responsive { overflow-x: auto; margin-top: 1rem; border: 1px solid var(--border); border-radius: 8px;}
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { background: #f8fafc; padding: 0.8rem; text-align: left; color: #64748b; font-weight: 700;}
td { padding: 0.8rem; border-bottom: 1px solid var(--border); }
.highlight { font-weight: 700; color: var(--text); font-size: 1rem;}
.badge { background: #e2e8f0; padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: 600;}

.empty-state { text-align: center; padding: 2rem 1rem; color: #94a3b8; }
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }

/* FOOTER */
footer {
    background: #0f172a; color: #94a3b8; text-align: center; padding: 2rem; margin-top: auto;
}
.footer-link {
    color: var(--white) !important; text-decoration: none; font-weight: 700;
    padding-bottom: 2px; border-bottom: 1px dashed rgba(255,255,255,0.4); transition: 0.3s;
}
.footer-link:hover { border-bottom-style: solid; }

/* ANIMATII */
.fade-in { animation: fadeIn 0.5s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }