/* ============================================================
   Network Controls Skills — Stylesheet
   Paylocity-inspired light theme: white sidebar, light slate bg,
   dark teal primary, consistent high-contrast text
   (condensed spacing — tight, business-dense layout)
   ============================================================ */

:root {
    /* Paylocity-inspired light theme (ported from TempTrackerPro reference) */
    --primary: #0f766e;         /* dark teal */
    --primary-light: #0d9488;   /* teal */
    --accent: #0d9488;
    --accent-hover: #0f766e;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #d97706;
    --info: #0891b2;
    --bg: #f1f5f9;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --sidebar-width: 260px;
}

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

body {
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.45;
    min-height: 100vh;
}

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

/* ============================================================
   Layout
   ============================================================ */

.wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: #ffffff;
    color: #334155;
    border-right: 1px solid var(--border);
    position: fixed;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    text-align: center;
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 2px;
}

.sidebar-header small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.nav-menu {
    list-style: none;
    padding: 4px 0;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(15,23,42,0.18) transparent;
}

.nav-section-wrap {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-section-items {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.nav-section-items.collapsed {
    display: none;
}

.nav-menu::-webkit-scrollbar {
    width: 5px;
}

.nav-menu::-webkit-scrollbar-track {
    background: transparent;
}

.nav-menu::-webkit-scrollbar-thumb {
    background: rgba(15,23,42,0.18);
    border-radius: 3px;
}

.nav-menu li a {
    display: block;
    padding: 5px 15px;
    color: #475569;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    font-size: 0.86rem;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    background: #f0fdfa;
    color: var(--primary);
    border-left-color: var(--accent);
}

.nav-menu li a i {
    width: 22px;
    display: inline-block;
    text-align: center;
    margin-right: 7px;
}

.nav-menu .nav-section {
    padding: 7px 15px 3px;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.1px;
    color: var(--primary);
    border-top: 1px solid var(--border);
    margin-top: 3px;
    pointer-events: none;
}

.nav-menu .nav-section.nav-collapsible {
    pointer-events: auto;
    padding-right: 12px;
    transition: color 0.2s;
    cursor: pointer;
    user-select: none;
}
.nav-menu .nav-section.nav-collapsible:hover {
    color: var(--accent-hover);
}

/* ---- Popup Lists ---- */
.review-emp-item:hover {
    background: #f0f4f8;
}

/* ---- Skills Matrix ---- */
.tier-header {
    transition: filter 0.15s;
}
.tier-header:hover {
    filter: brightness(1.15);
}
.tier-content {
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.sidebar-footer {
    flex-shrink: 0;
    padding: 10px 15px;
    border-top: 1px solid var(--border);
    font-size: 0.8rem;
    color: var(--text-muted);
    background: #f8fafc;
}

.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    padding: 14px 18px;
    min-height: 100vh;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.topbar h1 {
    font-size: 1.4rem;
    color: var(--primary);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-info span {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.user-info a.user-profile-link {
    color: inherit;
    text-decoration: none;
}

.user-info a.user-profile-link:hover span {
    color: var(--primary);
    text-decoration: underline;
}

/* STAR wordmark: yellow acronym letters on teal tagline */
.star-letter { color: var(--warning); }
.star-tagline { color: var(--accent); }

/* ============================================================
   Cards & Panels
   ============================================================ */

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 7px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.05);
    margin-bottom: 10px;
    overflow: hidden;
}

.card-header {
    background: #ffffff;
    color: var(--text);
    border-bottom: 1px solid var(--border);
    padding: 9px 14px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    font-size: 1rem;
    margin: 0;
}

.card-body {
    padding: 11px 14px;
}

/* ============================================================
   Tables
   ============================================================ */

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 7px 11px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: #f8fafc;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
}

.data-table tr:hover {
    background: #f0fdfa;
}

.data-table .actions {
    white-space: nowrap;
    min-width: 200px;
}

/* ============================================================
   Forms
   ============================================================ */

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

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

.form-control {
    width: 100%;
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 5px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
}

textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

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

/* ============================================================
   Buttons
   ============================================================ */

.btn {
    display: inline-block;
    padding: 7px 15px;
    border: none;
    border-radius: 5px;
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-primary {
    background: var(--primary-light);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary);
}

.btn-accent {
    background: var(--accent);
    color: #ffffff;
}

.btn-accent:hover {
    background: var(--accent-hover);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-warning {
    background: var(--warning);
    color: #fff;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 0.76rem;
}

.btn-lg {
    padding: 11px 24px;
    font-size: 0.95rem;
}

/* ============================================================
   Alerts
   ============================================================ */

.alert {
    padding: 10px 14px;
    border-radius: 5px;
    margin-bottom: 12px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: var(--success);
    color: #155724;
}

.alert-danger {
    background: #f8d7da;
    border-color: var(--danger);
    color: #721c24;
}

.alert-warning {
    background: #fff3cd;
    border-color: var(--warning);
    color: #856404;
}

.alert-info {
    background: #d1ecf1;
    border-color: var(--info);
    color: #0c5460;
}

/* ============================================================
   Status Badges
   ============================================================ */

.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.badge-not_started { background: #e9ecef; color: #495057; }
.badge-in_training { background: #cce5ff; color: #004085; }
.badge-ready_for_signoff { background: #fff3cd; color: #856404; }
.badge-signed_off { background: #d4edda; color: #155724; }
.badge-info { background: #d1ecf1; color: #0c5460; }
.badge-danger { background: #f8d7da; color: #721c24; }

/* ============================================================
   Skill Matrix Grid
   ============================================================ */

.matrix-category {
    margin-bottom: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 7px;
    box-shadow: 0 1px 3px rgba(15,23,42,0.05);
    overflow: hidden;
}

.matrix-category h4 {
    margin: 0;
    font-size: 1rem;
}

.matrix-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--card-bg);
    border-radius: 0 0 5px 5px;
    overflow: hidden;
}

.matrix-table th,
.matrix-table td {
    padding: 7px 11px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.matrix-table th {
    background: #f8fafc;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
}

.matrix-table .skill-name {
    font-weight: 500;
}

.matrix-table .signoff-info {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.matrix-table .signoff-info strong {
    color: var(--text);
}

/* ============================================================
   Login Page
   ============================================================ */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f766e 0%, #14b8a6 100%);
}

.login-box {
    background: var(--card-bg);
    padding: 32px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 420px;
}

.login-box h2 {
    text-align: center;
    color: var(--primary);
    margin-bottom: 5px;
}

.login-box .subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 22px;
    font-size: 0.9rem;
}

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

.login-logo span {
    display: inline-block;
    width: 60px;
    height: 60px;
    background: var(--accent);
    border-radius: 50%;
    line-height: 60px;
    color: #ffffff;
    font-size: 1.5rem;
    font-weight: bold;
}

/* ============================================================
   Dashboard Stats
   ============================================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 9px;
    margin-bottom: 12px;
}

.stat-card {
    background: var(--card-bg);
    padding: 9px 13px;
    border-radius: 7px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
}

.stat-card h4 {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 2px;
}

.stat-card .number {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--primary);
}

/* ============================================================
   Print Styles
   ============================================================ */

@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .main-content { margin-left: 0; padding: 0; }
    .card { box-shadow: none; border: 1px solid #ccc; }
    body { background: #fff; }
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
    .sidebar { width: 100%; position: relative; height: auto; }
    .main-content { margin-left: 0; }
    .wrapper { flex-direction: column; }
    .form-row { grid-template-columns: 1fr; }
}

/* ============================================================
   Logo Styles
   ============================================================ */

.sidebar-logo {
    background: #fff;
    padding: 12px 12px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo img {
    max-width: 100%;
    height: auto;
    max-height: 180px;
    display: block;
    margin: 0 auto;
}

.sidebar-logo-text {
    text-align: center;
    padding: 8px 12px 10px;
    border-bottom: 1px solid var(--border);
}

.sidebar-logo-text h2 {
    font-size: 1.05rem;
    color: var(--primary);
    margin: 0;
}

.sidebar-logo-text small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

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

.login-logo-img img {
    max-width: 100%;
    height: auto;
    max-height: 200px;
    display: block;
    margin: 0 auto;
}
