/* =============================================
   Fun Entertain GmbH – Intranet Stylesheet
   ============================================= */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary:     #1a2e4a;
    --primary-lt:  #243c5e;
    --accent:      #e8a020;
    --accent-lt:   #f5b740;
    --bg:          #f0f2f5;
    --white:       #ffffff;
    --text:        #1e2d3d;
    --text-muted:  #6b7a8d;
    --border:      #d8dde6;
    --success:     #2ecc71;
    --warning:     #f39c12;
    --danger:      #e74c3c;
    --info:        #3498db;
    --radius:      10px;
    --shadow:      0 2px 12px rgba(0,0,0,0.10);
    --shadow-lg:   0 8px 32px rgba(0,0,0,0.14);
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- TOPBAR ---- */
.topbar {
    background: var(--primary);
    color: #fff;
    padding: 0 24px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.topbar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.5px;
}

.topbar-logo span.company {
    color: var(--accent);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 0.88rem;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #c5d0de;
}

.topbar-user strong { color: #fff; }

.online-badge {
    background: var(--success);
    color: #fff;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
}

.btn-logout {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.25);
    padding: 6px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background 0.2s;
    text-decoration: none;
}
.btn-logout:hover { background: rgba(255,255,255,0.22); text-decoration: none; }

/* ---- SIDEBAR + LAYOUT ---- */
.layout { display: flex; min-height: calc(100vh - 60px); }

.sidebar {
    width: 230px;
    background: var(--primary-lt);
    color: #c5d0de;
    flex-shrink: 0;
    padding: 20px 0;
}

.sidebar-section {
    padding: 8px 20px 4px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #7a92aa;
    margin-top: 8px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: #c5d0de;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
    border-left: 3px solid transparent;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(255,255,255,0.08);
    color: #fff;
    border-left-color: var(--accent);
    text-decoration: none;
}

.sidebar nav a .icon { font-size: 1.1rem; width: 20px; text-align: center; }

/* ---- MAIN ---- */
.main { flex: 1; padding: 28px; overflow-x: auto; }

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}
.page-subtitle {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 24px;
}

/* ---- CARDS ---- */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.card-title {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.card-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    border-top: 4px solid var(--border);
}

.card-nav:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.card-nav.personal   { border-top-color: #3498db; }
.card-nav.buchhaltung{ border-top-color: #2ecc71; }
.card-nav.gf         { border-top-color: #9b59b6; }
.card-nav.filialen   { border-top-color: #e67e22; }
.card-nav.it         { border-top-color: #1abc9c; }
.card-nav.marketing  { border-top-color: #e74c3c; }
.card-nav.recht      { border-top-color: #34495e; }
.card-nav.verwaltung { border-top-color: #f39c12; }

.card-nav-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}
.card-nav-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ---- SECTION PANEL ---- */
.panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 24px;
    overflow: hidden;
}

.panel-header {
    background: var(--primary);
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.panel-header h2 {
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-body { padding: 20px; }

/* ---- ONLINE TABLE ---- */
.online-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.online-table th {
    background: #f5f7fa;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 2px solid var(--border);
}

.online-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #eef1f5;
    vertical-align: middle;
}

.online-table tr:last-child td { border-bottom: none; }
.online-table tr:hover td { background: #fafbfd; }

.dot-online {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: var(--success);
    display: inline-block;
    margin-right: 6px;
    box-shadow: 0 0 0 3px rgba(46,204,113,0.25);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%   { box-shadow: 0 0 0 0 rgba(46,204,113,0.5); }
    70%  { box-shadow: 0 0 0 7px rgba(46,204,113,0); }
    100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); }
}

.role-badge {
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
}

.role-inhaber            { background: #fdecd0; color: #a05010; }
.role-geschaeftsfuehrung { background: #e8d5f5; color: #6a1a9a; }
.role-it                 { background: #d0eef8; color: #0a5878; }
.role-anwalt             { background: #dde3ea; color: #3a4a5a; }
.role-mitarbeiter        { background: #e3f5ec; color: #1a6a3a; }

/* ---- LOGIN PAGE ---- */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #0f1e30 100%);
}

.login-box {
    background: var(--white);
    border-radius: 14px;
    padding: 42px 40px;
    width: 100%;
    max-width: 380px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo h1 {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary);
}

.login-logo h1 span { color: var(--accent); }

.login-logo p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}

.form-group { margin-bottom: 18px; }

.form-group label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--text);
    background: #fafbfd;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,46,74,0.1);
    background: #fff;
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 8px;
}

.btn-primary:hover  { background: var(--primary-lt); }
.btn-primary:active { transform: scale(0.98); }

.alert {
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    margin-bottom: 16px;
}

.alert-danger  { background: #fde8e8; color: #c0392b; border: 1px solid #f5c6c6; }
.alert-success { background: #e8f8f0; color: #1a7a40; border: 1px solid #b8e8cc; }
.alert-info    { background: #e8f4fd; color: #1a5f8a; border: 1px solid #b8d9f5; }

/* ---- ADMIN GRID ---- */
.admin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .admin-grid { grid-template-columns: 1fr; }
    .sidebar { display: none; }
}

/* ---- SECTION PAGE ---- */
.section-hero {
    background: linear-gradient(120deg, var(--primary) 0%, var(--primary-lt) 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 28px 28px 22px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.section-hero .hero-icon { font-size: 3rem; opacity: 0.85; }

.section-hero h1 { font-size: 1.6rem; font-weight: 700; }
.section-hero p  { color: #9bb8d5; font-size: 0.88rem; margin-top: 4px; }

/* NOTICE BOX */
.notice {
    background: #fffbf0;
    border: 1px solid #f5d88a;
    border-radius: 8px;
    padding: 14px 18px;
    font-size: 0.88rem;
    color: #7a5a10;
}

/* MINI STAT */
.mini-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.mini-stat {
    background: var(--white);
    border-radius: 8px;
    padding: 14px 20px;
    flex: 1;
    min-width: 130px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    text-align: center;
}

.mini-stat-val  { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.mini-stat-lbl  { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* User management table */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.data-table th {
    background: var(--primary);
    color: #fff;
    padding: 11px 14px;
    text-align: left;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #eef1f5;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafbfd; }

.status-active   { color: var(--success); font-weight: 600; }
.status-inactive { color: var(--danger);  font-weight: 600; }

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    background: #e8edf5;
    color: #3a5070;
    margin: 1px;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #b0bac5; border-radius: 3px; }
