/* OIT Assessment System - Custom Stylesheet
 * Compatible with Bootstrap 5 & Noto Sans Thai Font
 */
@import url('https://fonts.googleapis.com/css2?family=Noto Sans Thai:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap');

:root {
    --primary-color: #1e3a8a;       /* Navy Blue */
    --secondary-color: #3b82f6;     /* Light Blue */
    --bg-color: #f8fafc;            /* Off-white */
    --sidebar-bg: #0f172a;          /* Dark Navy */
    --sidebar-hover: #1e293b;       /* Hover state */
    --text-primary: #1e293b;
    --text-muted: #64748b;
    
    /* OIT Status Colors */
    --status-approved: #10b981;     /* Green */
    --status-rejected: #f59e0b;     /* Orange */
    --status-pending: #4b5563;      /* Dark Gray */
    --status-none: #94a3b8;         /* Light Gray */
}

body {
    font-family: 'Noto Sans Thai', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* Layout Wrapper */
.wrapper {
    display: flex;
    width: 100%;
    align-items: stretch;
    min-height: 100vh;
}

/* Sidebar Styling */
#sidebar {
    min-width: 260px;
    max-width: 260px;
    background: var(--sidebar-bg);
    color: #fff;
    transition: all 0.3s;
    z-index: 999;
}

#sidebar.active {
    margin-left: -260px;
}

#sidebar .sidebar-header {
    padding: 20px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

#sidebar ul.components {
    padding: 20px 0;
}

#sidebar ul p {
    color: #fff;
    padding: 10px;
}

#sidebar ul li a {
    padding: 12px 20px;
    font-size: 1.05rem;
    display: block;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

#sidebar ul li a:hover {
    color: #fff;
    background: var(--sidebar-hover);
    border-left-color: var(--secondary-color);
}

#sidebar ul li.active > a {
    color: #fff;
    background: var(--sidebar-hover);
    border-left-color: var(--secondary-color);
    font-weight: 500;
}

#sidebar ul li a i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

/* Content Area */
#content {
    width: 100%;
    padding: 25px;
    min-height: 100vh;
    transition: all 0.3s;
}

/* Cards & Styling */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    margin-bottom: 25px;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 18px 25px;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
}

.card-title {
    font-weight: 600;
    color: var(--primary-color);
}

/* Navbar */
.navbar {
    padding: 15px 25px;
    background: #fff;
    border: none;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* Buttons */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #162a6b;
    border-color: #162a6b;
}

/* OIT Badges & Status */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: inline-block;
}

.status-approved {
    background-color: rgba(16, 185, 129, 0.1);
    color: #047857;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-rejected {
    background-color: rgba(245, 158, 11, 0.1);
    color: #b45309;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-pending {
    background-color: rgba(13, 97, 255, 0.1);
    color: #374151;
    border: 1px solid rgba(75, 85, 99, 0.2);
}

.status-none {
    background-color: #f1f5f9;
    color: #64748b;
    border: 1px solid #cbd5e1;
}

/* History Timeline */
.history-list {
    position: relative;
    padding-left: 20px;
    list-style: none;
}

.history-list::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 4px;
    width: 2px;
    background: #e2e8f0;
}

.history-item {
    position: relative;
    margin-bottom: 20px;
}

.history-item::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 6px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px var(--secondary-color);
}

.history-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.history-user {
    font-weight: 600;
    font-size: 0.85rem;
}

.history-action {
    font-size: 0.85rem;
    margin-top: 2px;
}

/* Dashboard Summary Cards */
.dash-card {
    border-left: 5px solid;
}
.dash-card-approved { border-left-color: var(--status-approved) !important; }
.dash-card-rejected { border-left-color: var(--status-rejected) !important; }
.dash-card-pending { border-left-color: var(--status-pending) !important; }
.dash-card-none { border-left-color: var(--status-none) !important; }

/* Responsive adjustments */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -260px;
    }
    #sidebar.active {
        margin-left: 0;
    }
    .wrapper {
        position: relative;
    }
    #sidebarCollapse span {
        display: none;
    }
}
