﻿/* Root variables */
:root {
    --sidebar-width: 269px;
    --primary-dark: #34495e;
    --primary-light: #f8f9fa;
    --accent-green: #1abc9c;
    --accent-green-hover: #16a085;
    --accent-red: #e74c3c;
    --header-bg: #D3D3D3;
    --card-request: #062c43;
    --card-responded: #054569;
    --card-records: #5591ab;
    --card-cancelled: #9ccddc;
    --active-menu: #4169E1;
    --active-menu-hover: #82a1b5;
}

/* Basic resets */
body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f4f4f4;
    font-size: 14.5px;
    overflow-x: hidden;
    position: relative;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Layout structure */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--primary-dark);
    color: white;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease, left 0.3s ease;
    overflow-y: auto;
}
    /* Fix for underlined text in sidebar - add to the end of your CSS file */
    .sidebar a,
    .sidebar-menu a,
    .sidebar-menu a:hover,
    .sidebar-menu a:active,
    .sidebar-menu a.active {
        text-decoration: none !important;
    }

/* For logout link in sidebar */
.logout a {
    text-decoration: none !important;
}

/* For any other links in the sidebar that might be getting styling */
.sidebar * a {
    text-decoration: none !important;
}
.content-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    position: relative;
    transition: margin-left 0.3s ease;
}

.header-container {
    width: 100%;
    margin: 0 auto;
    background-color: var(--header-bg);
    border-top-left-radius: 4px;
    border-top-right-radius: 7px;
    position: sticky;
    top: 0;
    z-index: 1010;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Sidebar components */
.logo {
    width: 50px;
    height: 50px;
}

.sidebar-header {
    padding: 20px 0;
    text-align: center;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    width: 100%;
    margin: 0;
}

    .sidebar-menu li {
        width: 100%;
    }

    .sidebar-menu a {
        color: rgba(255, 255, 255, 0.8);
        display: flex;
        align-items: center;
        padding: 12px 20px;
        transition: all 0.3s;
        position: relative;
    }

        .sidebar-menu a i {
            margin-right: 10px;
            width: 20px;
            text-align: center;
        }

        .sidebar-menu a:hover {
            background-color: rgba(255, 255, 255, 0.1);
            color: white;
        }

        .sidebar-menu a.active {
            background-color: var(--active-menu);
            color: white;
            font-weight: bold;
        }

            .sidebar-menu a.active:hover {
                background-color: var(--active-menu-hover);
            }

.sidebar-separator {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 10px auto;
    width: 85%;
}

.sidebar-menu li:first-child a {
    font-size: 18px;
    font-weight: 500;
    padding: 15px 20px;
}

/* Dashboard card styles */
.card-dashboard {
    height: 180px;
    border-radius: 10px;
    color: white;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

    .card-dashboard:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 15px rgba(0,0,0,0.2);
    }

.card-icon {
    font-size: 2.5rem;
    opacity: 0.8;
}

/* Background colors for dashboard cards */
.bg-request {
    background-color: var(--card-request);
}

.bg-responded {
    background-color: var(--card-responded);
}

.bg-records {
    background-color: var(--card-records);
}

.bg-cancelled {
    background-color: var(--card-cancelled);
}

/* Active card highlighting */
.active-card {
    border: 3px solid #fff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
}

/* Fix for logout placement */
.logout {
    margin-top: auto;
    padding: 15px;
}

/* Sidebar backdrop for mobile */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
    z-index: 1040;
    display: none;
}

body.sidebar-open .sidebar-backdrop {
    display: block;
}

/* Responsive design */
@media (max-width: 767.98px) {
    /* Sidebar adjustments for mobile */
    .sidebar {
        position: fixed;
        top: 0 !important;
        left: -280px;
        height: 100vh;
        width: 280px;
        max-width: 80vw;
        z-index: 1050;
        transform: none;
        box-shadow: none;
        padding-top: 10px;
    }

        .sidebar.show {
            left: 0;
            transform: none;
            box-shadow: 0 0 15px rgba(0,0,0,0.2);
        }

    .content-wrapper {
        margin-left: 0;
    }

    /* Sidebar toggle button */
    .sidebar-toggle {
        display: flex;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1060;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background-color: var(--primary-dark);
        color: white;
        border: none;
        justify-content: center;
        align-items: center;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        transition: all 0.3s;
    }

        .sidebar-toggle.active {
            background-color: var(--accent-green);
        }

    /* Header adjustments for mobile */
    .header-container {
        padding-left: 55px !important;
        margin-top: 0;
    }
    /* Urgency levels */
    .urgency-high {
        border-left: 5px solid #ff3547;
    }

    .urgency-medium {
        border-left: 5px solid #fb8c00;
    }

    .urgency-low {
        border-left: 5px solid #4caf50;
    }

    /* Badge styling */
    .urgency-badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
        font-weight: 600;
    }

    .urgency-badge-high {
        background-color: rgba(255, 53, 71, 0.15);
        color: #ff3547;
    }

    .urgency-badge-medium {
        background-color: rgba(251, 140, 0, 0.15);
        color: #fb8c00;
    }

    .urgency-badge-low {
        background-color: rgba(76, 175, 80, 0.15);
        color: #4caf50;
    }

    /* Backup request badge */
    .backup-badge {
        position: absolute;
        top: -10px;
        right: -10px;
        background-color: #ff3547;
        color: white;
        border-radius: 50%;
        width: 25px;
        height: 25px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.8rem;
        font-weight: bold;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        border: 2px solid #fff;
        z-index: 10;
    }
}

/* Print styles */
@media print {
    .sidebar, .sidebar-toggle, .sidebar-backdrop {
        display: none !important;
    }

    .content-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
}
