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

:root {
    --primary: #0D3E20;
    /* USJR Green */
    --secondary: #FEB104;
    /* USJR Gold */
    --success: #1cc88a;
    --info: #36b9cc;
    --warning: #FEB104;
    /* Using gold for warning */
    --danger: #e74a3b;
    --light: #F2F1ED;
    /* USJR Light Beige */
    --dark: #0D3E20;
    --sidebar-bg: #0D3E20;
    --topbar-bg: #ffffff;
    --bg-color: #F2F1ED;
    --white: #ffffff;
    --text-primary: #0D3E20;
    --text-inverse: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    color: var(--white);
    transition: all 0.3s ease;
    flex-shrink: 0;
    overflow-x: hidden;
    border-right: 3px solid var(--secondary);
}

.sidebar.collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 20px;
    font-size: 1.25rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    white-space: nowrap;
    background: var(--primary);
    color: var(--secondary);
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
}

.sidebar.collapsed .header-text {
    display: none;
}

#sidebarToggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 5px;
    transition: 0.3s;
}

.sidebar.collapsed #sidebarToggle {
    transform: rotate(180deg);
}

.sidebar-menu {
    list-style: none;
    padding: 20px 0;
}

.sidebar-menu li a {
    padding: 15px 25px;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: 0.3s;
    white-space: nowrap;
}

.sidebar.collapsed .sidebar-menu li a {
    padding: 15px 0;
    justify-content: center;
}

.sidebar.collapsed .menu-text {
    display: none;
}

.sidebar-menu li a:hover,
.sidebar-menu li a.active {
    background: rgba(254, 177, 4, 0.15);
    color: var(--secondary);
    border-left: 4px solid var(--secondary);
}

.sidebar-menu li a i {
    margin-right: 15px;
    width: 20px;
    text-align: center;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    height: 70px;
    background: var(--topbar-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    border-bottom: 4px solid var(--secondary);
    box-shadow: 0 0.15rem 1.75rem 0 rgba(13, 62, 32, 0.05);
    z-index: 10;
}

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

.user-info .name {
    font-weight: 500;
    color: var(--dark);
}

/* Content Area */
.container {
    padding: 30px;
}

.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.1);
    border: none;
    margin-bottom: 30px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #e3e6f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.card-body {
    padding: 24px;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

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

th {
    background-color: var(--primary);
    color: var(--secondary);
    font-weight: 600;
    text-align: left;
    padding: 12px 15px;
    border-bottom: 2px solid var(--secondary);
    white-space: nowrap;
}

td {
    padding: 12px 15px;
    border-bottom: 1px solid #e3e6f0;
    color: #444;
}

/* Grayed out row for Approved status */
tr.status-approved td {
    background-color: #f1f1f1 !important;
    color: #999 !important;
    filter: grayscale(1);
    opacity: 0.7;
}

/* Badges */
.badge {
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
}

.badge-pending {
    background-color: var(--warning);
}

.badge-approved {
    background-color: var(--success);
}

.badge-rejected {
    background-color: var(--danger);
}

.badge-processing {
    background-color: var(--info);
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark);
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #d1d3e2;
    border-radius: 5px;
    font-size: 0.9rem;
    transition: 0.3s;
}

.form-control:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(78, 115, 223, 0.25);
}

.btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--secondary);
    border: 1px solid var(--secondary);
}

.btn-primary:hover {
    background-color: #0b331a;
    color: var(--white);
}

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

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

/* Auth Pages */
.auth-wrapper {
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, #0b331a 100%);
    position: relative;
}

.auth-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 10px;
    background: var(--secondary);
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.2);
    border-top: 5px solid var(--secondary);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h2 {
    color: var(--primary);
    margin-bottom: 10px;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 10px;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal.active {
    display: flex;
}

/* Filter Sidebar */
.filter-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1100;
    display: none;
}

.filter-overlay.active {
    display: block;
}

.filter-sidebar {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background: white;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1200;
    transition: 0.3s ease;
    display: flex;
    flex-direction: column;
}

.filter-sidebar.active {
    right: 0;
}

.filter-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #e3e6f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--primary);
    color: white;
}

.filter-sidebar-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.column-toggle-item {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--dark);
}

.column-toggle-item input {
    margin-right: 12px;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.hidden-column {
    display: none !important;
}

.filter-btn {
    background: var(--info);
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.toast {
    background: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    animation: slideInRight 0.3s ease-out;
    border-left: 5px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.toast.toast-success {
    border-left-color: var(--success);
}

.toast.toast-error {
    border-left-color: var(--danger);
}

.toast.toast-warning {
    border-left-color: var(--secondary);
}

.toast i {
    font-size: 1.2rem;
}

.toast-success i {
    color: var(--success);
}

.toast-error i {
    color: var(--danger);
}

.toast-warning i {
    color: var(--secondary);
}

.toast-content {
    flex-grow: 1;
}

.toast-message {
    font-weight: 500;
    color: var(--primary);
    font-size: 0.95rem;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.1);
    width: 100%;
}

.toast-progress-bar {
    height: 100%;
    background: currentColor;
    width: 100%;
    animation: progress 3s linear forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes progress {
    from {
        width: 100%;
    }

    to {
        width: 0%;
    }
}
/* Timeline & Tabs Progress */
.modal-tabs {
    display: flex;
    border-bottom: 2px solid #e3e6f0;
    margin-bottom: 25px;
}

.modal-tab {
    padding: 12px 25px;
    cursor: pointer;
    font-weight: 600;
    color: #858796;
    border-bottom: 3px solid transparent;
    transition: 0.3s;
}

.modal-tab.active {
    color: var(--primary);
    border-bottom-color: var(--secondary);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Vertical Timeline */
.timeline {
    position: relative;
    padding-left: 50px;
    margin: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 19px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #e3e6f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-dot {
    position: absolute;
    left: -40px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: #e3e6f0;
    border: 4px solid white;
    box-shadow: 0 0 0 3px #e3e6f0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.timeline-dot i {
    font-size: 0.7rem;
    color: white;
}

.timeline-item.approved .timeline-dot {
    background: var(--success);
    box-shadow: 0 0 0 3px rgba(28, 200, 138, 0.2);
}

.timeline-item.pending .timeline-dot {
    background: var(--warning);
    box-shadow: 0 0 0 3px rgba(254, 177, 4, 0.2);
}

.timeline-item.locked .timeline-dot {
    background: #ccc;
}

.timeline-content {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid #e3e6f0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.timeline-content h6 {
    margin: 0 0 5px 0;
    font-weight: 700;
    color: var(--primary);
}

.timeline-content p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

.timeline-status-text {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-top: 10px;
    display: block;
}

.status-pending { color: var(--warning); }
.status-approved { color: var(--success); }
.status-locked { color: #999; }
