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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
}

/* ── Login ── */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a237e 0%, #1565c0 100%);
}

.login-box {
    background: #fff;
    padding: 2.5rem;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 400px;
}

.login-box .logo {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.login-box h2 {
    text-align: center;
    color: #1a237e;
    font-size: 1.5rem;
    margin-bottom: 0.4rem;
}

.login-box .subtitle {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 1.8rem;
}

.login-hint {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.78rem;
    color: #bbb;
    background: #f8f8f8;
    padding: 0.6rem;
    border-radius: 6px;
}

/* ── Layout ── */
.layout {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
    width: 240px;
    background: #1a237e;
    color: #fff;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 100;
}

.sidebar-logo {
    padding: 1.2rem 1.5rem;
    background: #0d1757;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.sidebar-user {
    padding: 0.9rem 1.5rem;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.7);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    line-height: 1.5;
}

.sidebar-user strong {
    color: #fff;
    font-size: 0.9rem;
    display: block;
}

.sidebar nav {
    flex: 1;
    padding-top: 0.5rem;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 0.92rem;
    transition: background 0.2s, color 0.2s;
    border-left: 3px solid transparent;
}

.sidebar nav a:hover,
.sidebar nav a.active {
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-left-color: #90caf9;
}

.sidebar-logout {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logout a {
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.2s;
}

.sidebar-logout a:hover { color: #fff; }

/* ── Main content ── */
.main-content {
    flex: 1;
    margin-left: 240px;
    padding: 2rem;
    min-height: 100vh;
}

/* ── Page header ── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.page-header h1 {
    font-size: 1.5rem;
    color: #1a237e;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ── Cards ── */
.card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a237e;
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid #e8eaf6;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* ── Stats ── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.4rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    border-left: 4px solid #1a237e;
    display: flex;
    flex-direction: column;
}

.stat-card.green  { border-left-color: #2e7d32; }
.stat-card.orange { border-left-color: #e65100; }
.stat-card.purple { border-left-color: #6a1b9a; }

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #1a237e;
    line-height: 1;
}
.stat-card.green  .stat-number { color: #2e7d32; }
.stat-card.orange .stat-number { color: #e65100; }
.stat-card.purple .stat-number { color: #6a1b9a; }

.stat-label {
    font-size: 0.82rem;
    color: #888;
    margin-top: 0.3rem;
}

/* ── Forms ── */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 1.5px solid #dde;
    border-radius: 7px;
    font-size: 0.93rem;
    font-family: inherit;
    transition: border-color 0.2s;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #1a237e;
    box-shadow: 0 0 0 3px rgba(26,35,126,0.08);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.3rem;
    border: none;
    border-radius: 7px;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn:hover  { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,0.15); }
.btn:active { transform: translateY(0); box-shadow: none; }

.btn-primary { background: #1a237e; color: #fff; }
.btn-primary:hover { background: #283593; }

.btn-success { background: #2e7d32; color: #fff; }
.btn-success:hover { background: #1b5e20; }

.btn-danger { background: #c62828; color: #fff; }
.btn-danger:hover { background: #b71c1c; }

.btn-secondary { background: #e0e0e0; color: #333; }
.btn-secondary:hover { background: #bdbdbd; }

.btn-sm { padding: 0.3rem 0.75rem; font-size: 0.8rem; }
.btn-full { width: 100%; justify-content: center; padding: 0.7rem; }

/* ── Tables ── */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

thead th {
    background: #e8eaf6;
    color: #1a237e;
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 700;
    white-space: nowrap;
}

tbody td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fafafa; }

/* ── Alerts ── */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 7px;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert-success { background: #e8f5e9; color: #2e7d32; border-left: 4px solid #2e7d32; }
.alert-error   { background: #ffebee; color: #c62828; border-left: 4px solid #c62828; }
.alert-info    { background: #e3f2fd; color: #1565c0; border-left: 4px solid #1565c0; }

/* ── Badges ── */
.badge {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin   { background: #e8eaf6; color: #1a237e; }
.badge-gerente { background: #e8f5e9; color: #2e7d32; }

/* ── Empty state ── */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #bbb;
}

.empty-state .empty-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.empty-state p { font-size: 0.9rem; }

/* ── Delete form inline ── */
.delete-form {
    display: inline;
}

/* ── Employee selector in extras ── */
.emp-card {
    border: 2px solid #e8eaf6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    transition: border-color 0.2s;
}

.emp-card:hover { border-color: #90caf9; }

.emp-name { font-weight: 600; font-size: 0.95rem; }
.emp-email { font-size: 0.8rem; color: #888; }
