/* =============================================
   RR CONSTRUCTION - Employee Transfer System
   Professional Red Theme
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #c0111f;
    --primary-dark: #8b0000;
    --primary-light: #e8001a;
    --primary-xlight: #fff0f1;
    --sidebar-bg: #1a0002;
    --sidebar-hover: #2d0004;
    --sidebar-active: #c0111f;
    --text-dark: #1a1a2e;
    --text-muted: #6b7280;
    --bg-main: #f4f5f7;
    --white: #ffffff;
    --border: #e5e7eb;
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.05);
    --radius: 8px;
    --radius-sm: 4px;
    --radius-lg: 12px;
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-main);
    color: var(--text-dark);
    font-size: 14px;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }

/* ========== LOGIN PAGE ========== */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #8b0000 0%, #c0111f 40%, #1a0002 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    top: -200px; right: -200px;
}
.login-page::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
    bottom: -150px; left: -100px;
}

.login-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1;
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}
.login-logo .logo-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(192,17,31,0.4);
}
.login-logo .logo-icon svg { width: 32px; height: 32px; fill: white; }
.login-logo h1 { font-size: 22px; font-weight: 700; color: var(--text-dark); }
.login-logo p { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.login-card .form-label { font-weight: 500; color: var(--text-dark); margin-bottom: 6px; }
.login-card .form-control {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.login-card .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(192,17,31,0.12);
    outline: none;
}

.btn-primary-red {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    letter-spacing: 0.3px;
}
.btn-primary-red:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 4px 12px rgba(192,17,31,0.4);
    transform: translateY(-1px);
}

/* ========== APP LAYOUT ========== */
.app-wrapper { display: flex; height: 100vh; overflow: hidden; }

/* SIDEBAR */
.sidebar {
    width: 255px;
    min-width: 255px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    transition: width 0.3s;
    position: relative;
    z-index: 100;
}

.sidebar-brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-brand .brand-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(192,17,31,0.4);
}
.sidebar-brand .brand-icon svg { width: 22px; height: 22px; fill: white; }
.sidebar-brand-text { overflow: hidden; }
.sidebar-brand-text h2 { color: white; font-size: 15px; font-weight: 700; white-space: nowrap; }
.sidebar-brand-text span { color: rgba(255,255,255,0.4); font-size: 11px; white-space: nowrap; }

.sidebar-section-label {
    padding: 20px 20px 8px;
    color: rgba(255,255,255,0.3);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.sidebar-nav { list-style: none; padding: 0 10px; flex: 1; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 500;
    transition: all 0.15s;
}
.sidebar-nav a:hover { background: var(--sidebar-hover); color: rgba(255,255,255,0.9); }
.sidebar-nav a.active { background: var(--sidebar-active); color: white; box-shadow: 0 2px 8px rgba(192,17,31,0.5); }
.sidebar-nav a svg { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.8; }
.sidebar-nav a.active svg { opacity: 1; }
.sidebar-nav a .nav-badge {
    margin-left: auto;
    background: var(--primary);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    min-width: 20px;
    text-align: center;
}
.sidebar-nav a.active .nav-badge { background: rgba(255,255,255,0.3); }

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-footer .user-avatar {
    width: 34px; height: 34px;
    background: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 13px;
    flex-shrink: 0;
}
.sidebar-footer .user-info { flex: 1; min-width: 0; }
.sidebar-footer .user-info strong { color: white; font-size: 13px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-footer .user-info span { color: rgba(255,255,255,0.4); font-size: 11px; text-transform: capitalize; }
.sidebar-footer a.logout-btn {
    color: rgba(255,255,255,0.4);
    text-decoration: none;
    transition: color 0.2s;
    flex-shrink: 0;
}
.sidebar-footer a.logout-btn:hover { color: #ff6b6b; }
.sidebar-footer a.logout-btn svg { 
    width: 20px; 
    height: 20px; 
    fill: none; 
    stroke: currentColor; 
    stroke-width: 2; 
    stroke-linecap: round; 
    stroke-linejoin: round; 
}

/* MAIN CONTENT */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.topbar {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
    box-shadow: var(--shadow);
}

.topbar-title { font-size: 18px; font-weight: 700; color: var(--text-dark); }
.topbar-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
}

/* ========== CARDS & STATS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
    width: 52px; height: 52px;
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-icon.red { background: rgba(192,17,31,0.1); }
.stat-icon.red svg { fill: var(--primary); width: 26px; height: 26px; }
.stat-icon.green { background: rgba(16,185,129,0.1); }
.stat-icon.green svg { fill: #10b981; width: 26px; height: 26px; }
.stat-icon.yellow { background: rgba(245,158,11,0.1); }
.stat-icon.yellow svg { fill: #f59e0b; width: 26px; height: 26px; }
.stat-icon.blue { background: rgba(59,130,246,0.1); }
.stat-icon.blue svg { fill: #3b82f6; width: 26px; height: 26px; }
.stat-info .stat-number { font-size: 28px; font-weight: 700; color: var(--text-dark); line-height: 1; }
.stat-info .stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; font-weight: 500; }

/* ========== PANELS & TABLES ========== */
.panel {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    margin-bottom: 24px;
}

.panel-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.panel-header h3 { font-size: 15px; font-weight: 700; color: var(--text-dark); }
.panel-header p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.panel-body { padding: 20px; }

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}
.data-table thead tr th {
    padding: 11px 16px;
    background: #f9fafb;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}
.data-table thead tr th:first-child { border-radius: var(--radius-sm) 0 0 0; }
.data-table thead tr th:last-child { border-radius: 0 var(--radius-sm) 0 0; }
.data-table tbody tr td {
    padding: 13px 16px;
    border-bottom: 1px solid #f3f4f6;
    font-size: 13.5px;
    vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #fafafa; }
.data-table .emp-name { font-weight: 600; color: var(--text-dark); }
.data-table .emp-meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ========== BADGES ========== */
.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
}
.badge-status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-pending::before { background: #f59e0b; }
.badge-accepted { background: #d1fae5; color: #065f46; }
.badge-accepted::before { background: #10b981; }
.badge-rejected { background: #fee2e2; color: #991b1b; }
.badge-rejected::before { background: #ef4444; }
.badge-role-super { background: rgba(192,17,31,0.1); color: var(--primary); font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px; }
.badge-role-admin { background: #eff6ff; color: #1e40af; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 4px; }

/* ========== BUTTONS ========== */
.btn-red {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-sm);
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-red:hover { background: var(--primary-dark); box-shadow: 0 4px 10px rgba(192,17,31,0.35); transform: translateY(-1px); color: white; }
.btn-red svg { width: 15px; height: 15px; fill: white; }

.btn-outline {
    background: transparent;
    color: var(--text-dark);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.2s;
    text-decoration: none;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-xlight); }
.btn-outline svg { width: 14px; height: 14px; }

.btn-icon {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-sm);
    border: none; cursor: pointer;
    transition: all 0.15s;
    text-decoration: none;
}
.btn-icon.edit { background: #eff6ff; color: #3b82f6; }
.btn-icon.edit:hover { background: #3b82f6; color: white; }
.btn-icon.delete { background: #fff0f1; color: var(--primary); }
.btn-icon.delete:hover { background: var(--primary); color: white; }
.btn-icon.view { background: #f0fdf4; color: #16a34a; }
.btn-icon.view:hover { background: #16a34a; color: white; }
.btn-icon svg { width: 14px; height: 14px; fill: currentColor; }

.action-group { display: flex; align-items: center; gap: 4px; }

/* ========== ULTRA-PREMIUM MODALS ========== */
.modal-backdrop.show { opacity: 1 !important; background-color: rgba(15, 23, 42, 0.5) !important; backdrop-filter: blur(4px) !important; -webkit-backdrop-filter: blur(4px) !important; }
.modal-content { 
    background: #ffffff !important; 
    border: none !important; 
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important; 
    border-radius: 20px !important; 
    overflow: hidden;
}
.modal.fade .modal-dialog { transform: scale(0.95); opacity: 0; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.modal.show .modal-dialog { transform: scale(1); opacity: 1; }

.modal-header { 
    background: #ffffff; 
    color: var(--text-dark); 
    border-bottom: 1px solid rgba(0,0,0,0.05) !important; 
    padding: 20px 28px; 
}
.modal-header .modal-title { font-size: 18px; font-weight: 700; color: #111827; }
.modal-header .btn-close { filter: none; opacity: 0.5; transition: opacity 0.2s; }
.modal-header .btn-close:hover { opacity: 1; }
.modal-body { padding: 28px; background: #fafafa; }
.modal-footer { padding: 20px 28px; border-top: 1px solid rgba(0,0,0,0.05) !important; background: #ffffff; }

.form-label { font-size: 13px; font-weight: 600; color: var(--text-dark); margin-bottom: 6px; }
.form-control, .form-select {
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 9px 14px;
    font-size: 13.5px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(192,17,31,0.1);
    outline: none;
}

/* TRANSFER FORM SPECIFIC */
.transfer-form-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}
.transfer-form-header {
    background: var(--primary-dark);
    color: white;
    padding: 18px 28px;
    text-align: center;
}
.transfer-form-header h2 { font-size: 18px; font-weight: 700; }
.transfer-form-header p { font-size: 12px; opacity: 0.8; margin-top: 4px; }
.transfer-form-body { padding: 28px; }
.form-section-title {
    font-size: 13px; font-weight: 700; color: var(--primary);
    text-transform: uppercase; letter-spacing: 0.8px;
    border-bottom: 2px solid var(--primary-xlight);
    padding-bottom: 8px; margin-bottom: 16px;
}
.field-line {
    border-bottom: 1px solid #ccc;
    min-height: 24px;
    padding: 2px 4px;
    display: inline-block;
    min-width: 200px;
}
.checkbox-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    border: 1px solid #ccc;
    padding: 12px;
    border-radius: 4px;
}

/* ========== BREADCRUMB ========== */
.breadcrumb { background: transparent; padding: 0; margin-bottom: 20px; font-size: 13px; }
.breadcrumb-item a { color: var(--primary); text-decoration: none; font-weight: 500; }
.breadcrumb-item.active { color: var(--text-muted); }
.breadcrumb-item + .breadcrumb-item::before { color: var(--text-muted); }

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
}
.empty-state svg { width: 52px; height: 52px; fill: #d1d5db; margin-bottom: 16px; }
.empty-state h4 { font-size: 16px; font-weight: 600; color: #374151; margin-bottom: 8px; }
.empty-state p { font-size: 13px; }

/* ========== SEARCH BOX ========== */
.search-box {
    position: relative;
    display: inline-flex;
    align-items: center;
}
.search-box svg {
    position: absolute;
    left: 10px;
    width: 15px; height: 15px;
    fill: var(--text-muted);
}
.search-box input {
    padding: 8px 12px 8px 34px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    width: 220px;
    transition: all 0.2s;
}
.search-box input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(192,17,31,0.1); }

/* ========== REPORT CARDS ========== */
.report-section { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 24px; }
.report-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}
.report-card:hover { border-color: var(--primary); box-shadow: 0 4px 12px rgba(192,17,31,0.12); transform: translateY(-2px); }
.report-card-icon { width: 44px; height: 44px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; }
.report-card-icon.red { background: rgba(192,17,31,0.1); }
.report-card-icon.red svg { fill: var(--primary); width: 22px; height: 22px; }
.report-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.report-card p { font-size: 12px; color: var(--text-muted); line-height: 1.5; }

/* ========== PILLS NAV ========== */
.nav-pills-custom { gap: 4px; margin-bottom: 20px; border-bottom: 2px solid var(--border); }
.nav-pills-custom .nav-link { border-radius: var(--radius-sm) var(--radius-sm) 0 0; color: var(--text-muted); font-size: 13px; font-weight: 600; padding: 10px 18px; border: none; background: transparent; margin-bottom: -2px; border-bottom: 2px solid transparent; }
.nav-pills-custom .nav-link.active { color: var(--primary); border-bottom-color: var(--primary); background: transparent; }
.nav-pills-custom .nav-link:hover:not(.active) { color: var(--text-dark); background: #f9fafb; }

/* ========== ALERTS ========== */
.alert-info-red { background: rgba(192,17,31,0.06); border: 1px solid rgba(192,17,31,0.2); border-radius: var(--radius-sm); padding: 12px 16px; color: var(--primary-dark); font-size: 13px; }

/* Location Tag */
.location-tag { display: inline-flex; align-items: center; gap: 4px; background: #f3f4f6; color: var(--text-muted); border-radius: 20px; padding: 3px 10px; font-size: 12px; margin: 2px; }
.location-tag svg { width: 12px; height: 12px; fill: var(--text-muted); }

.arrow-icon { color: var(--primary); font-weight: 700; margin: 0 6px; font-size: 16px; }


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