/* General Body and Typography */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Poppins', sans-serif;
    background-color: #e9ecef; /* Slightly darker gray background */
    color: #333;
    line-height: 1.6;
}

/* Custom Primary Color (Example: a shade of teal/blue) */
:root {
    --bs-primary: #20c997; /* A vibrant teal */
    --bs-primary-rgb: 32, 201, 151;
    --bs-secondary: #6c757d;
    --bs-success: #28a745;
    --bs-info: #17a2b8;
    --bs-warning: #ffc107;
    --bs-danger: #dc3545;
    --bs-light: #f8f9fa;
    --bs-dark: #343a40;
}

/* Override Bootstrap Primary Button */
.btn-primary {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    font-weight: 500;
}
.btn-primary:hover {
    background-color: #17a67d; /* Darker shade on hover */
    border-color: #17a67d;
}
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    font-weight: 500;
}
.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}
.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #333;
    font-weight: 500;
}
.btn-warning:hover {
    background-color: #e0a800;
    border-color: #d39e00;
}


/* === New Navbar Styling === */

/* Main navbar container */
.navbar {
    /* A modern, vibrant gradient */
    background: linear-gradient(90deg, #4b6cb7 0%, #182848 100%) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    /* Add a subtle animation on load */
    animation: slideDown 0.5s ease-out;
}

/* Keyframes for the entrance animation */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Navbar brand "Input SO" */
.navbar-brand {
    color: #fff !important;
    font-weight: 700; /* Bolder */
    font-size: 1.4rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

/* Navigation links */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.85) !important; /* Slightly softer white */
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    margin: 0 0.25rem;
    border-radius: 0.5rem; /* Rounded corners for the hover effect */
    transition: all 0.3s ease; /* Smooth transition for all properties */
    position: relative;
    top: 0;
}

/* Hover and focus effect for links */
.navbar-nav .nav-link:hover, 
.navbar-nav .nav-link:focus {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
    top: -2px; /* Subtle lift effect */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Style for the active page link */
.navbar-nav .nav-link.active {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

/* Dropdown menu styling */
.dropdown-menu {
    background-color: #182848; /* Match the darker end of the gradient */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.dropdown-item {
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.2s ease;
}

.dropdown-item:hover, 
.dropdown-item:focus {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* User info text */
.navbar-text {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Logout button */
.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.7);
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    border-color: #fff;
    background-color: #fff;
    color: #182848; /* Dark blue text on hover */
}

/* Card Styling */
.card {
    border: none;
    border-radius: 0.75rem; /* More rounded corners */
    box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Softer, larger shadow */
    margin-bottom: 1.5rem; /* Consistent spacing */
}
.card-header {
    background-color: #fff;
    border-bottom: 1px solid #eee;
    font-weight: 500;
    color: #444;
    padding: 1rem 1.5rem;
    border-top-left-radius: 0.75rem;
    border-top-right-radius: 0.75rem;
}
.card-body {
    padding: 1.5rem;
}

/* Login Page Specific */
.login-container {
    max-width: 450px; /* Slightly wider */
    margin: 120px auto;
    padding: 40px;
    background-color: #fff;
    border-radius: 1rem; /* More rounded */
    box-shadow: 0 8px 25px rgba(0,0,0,0.15); /* Deeper shadow */
}
.login-container h2 {
    font-weight: 600; /* Bolder title */
    color: #222;
    margin-bottom: 1.5rem;
}

/* Form Control Focus */
.form-control, .form-select {
    border-radius: 0.5rem;
    padding: 0.6rem 0.75rem;
}
.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), .25);
}
.form-label {
    font-weight: 500;
    color: #555;
}
fieldset.border {
    border-radius: 0.75rem;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem;
}
fieldset.border legend {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    padding: 0 0.75rem;
    width: auto;
    margin-left: 0.5rem;
}

/* Table Styling */
.table {
    border-radius: 0.5rem;
    overflow: hidden; /* Ensures rounded corners apply to table */
}
.table thead th {
    background-color: var(--bs-dark);
    color: #fff;
    border-bottom: none;
    font-weight: 500;
    padding: 0.75rem 1rem;
}
.table tbody tr:nth-of-type(odd) {
    background-color: rgba(0,0,0,0.03);
}
.table-hover tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), .1);
}
.table-sm th, .table-sm td {
    padding: 0.5rem 0.75rem;
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
    font-size: 0.9rem;
    padding: 0.75rem 1.25rem;
}

/* Utility Classes */
.text-end {
    text-align: right;
}
.text-center {
    text-align: center;
}
.fw-bold {
    font-weight: 600;
}
.fs-1 {
    font-size: 2.5rem !important;
}
.fs-4 {
    font-size: 1.5rem !important;
}

/* Specific for SO Report Table */
.table-secondary {
    background-color: #e9ecef !important;
}
.table-secondary td {
    font-weight: 600;
    color: #333;
}
.table-group-divider {
    border-top: 2px solid var(--bs-dark);
}
.table-group-divider tr td {
    background-color: #f8f9fa;
}

/* Autocomplete UI */
.ui-autocomplete {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1050; /* Ensure it's above other elements */
}
.ui-menu-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    border-bottom: 1px solid #eee;
}
.ui-menu-item:last-child {
    border-bottom: none;
}
.ui-menu-item:hover, .ui-menu-item.ui-state-active {
    background-color: rgba(var(--bs-primary-rgb), .1);
    color: var(--bs-primary);
    border-color: var(--bs-primary);
}
.ui-helper-hidden-accessible {
    display: none;
}