/* Main Layout Styles */
body {
    min-height: 100vh;
    background: #ffffff; /* Changed to white */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 2rem 0;
    background: linear-gradient(180deg, #ff7f32 0%, #c04508 100%); /* Tangerine orange gradient */
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: radial-gradient(circle at 50% 0%, rgba(255, 127, 50, 0.2), transparent);
    pointer-events: none;
}

.sidebar .position-sticky {
    position: relative;
    z-index: 1;
}

.sidebar .nav-link {
    color: #ff6b1f; 
    font-weight: 500;
    padding: 1rem 1.5rem;
    margin: 0.25rem 1rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.sidebar .nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #ff7f32 0%, #c04508 100%);
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 4px 4px 0;
}

.sidebar .nav-link::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(255, 127, 50, 0.15) 0%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 12px;
}

.sidebar .nav-link:hover {
    color: #fff; /* White on hover */
    background: rgba(255, 107, 31, 0.1); 
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(255, 127, 50, 0.2);
}

.sidebar .nav-link:hover::after {
    opacity: 1;
}

.sidebar .nav-link.active {
    color: #fff; /* White for active link text */
    background: linear-gradient(90deg, rgba(221, 122, 0, 0.25) 0%, rgba(221, 122, 0, 0.05) 100%);
    font-weight: 600;
    box-shadow: 0 4px 16px rgba(221, 122, 0, 0.25);
}

.sidebar .nav-link.active::before {
    background: linear-gradient(180deg, #dd7a00 0%, #a45000 100%);
    transform: scaleY(1);
}

.sidebar .nav-link.active::after {
    opacity: 1;
}

/* Add icons effect to nav items */
.sidebar .nav-item {
    position: relative;
}

.sidebar .nav-item::before {
    content: '→';
    position: absolute;
    left: 0.5rem;
    opacity: 0;
    color: #b34805;
    font-weight: bold;
    transition: all 0.3s ease;
}

.sidebar .nav-item:hover::before {
    opacity: 1;
    left: 0.75rem;
}

/* Main Content Area */
main {
    padding-top: 2rem;
    animation: fadeIn 0.6s ease;
    background: transparent;
}

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

/* Content Wrapper */
.content-wrapper {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 20px;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 1.5rem;
    border-radius: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: #fff;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15), 0 8px 16px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: linear-gradient(135deg, rgba(255, 127, 50, 0.1) 0%, rgba(255, 107, 31, 0.1) 100%);
    border-bottom: 2px solid rgba(255, 127, 50, 0.2);
    border-radius: 16px 16px 0 0 !important;
    padding: 1.5rem 1.75rem;
    font-weight: 700;
    color: #1a202c;
    font-size: 1.1rem;
    letter-spacing: 0.3px;
}

/* Form Styles */
.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 0.875rem 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    background: #fff;
}

.form-control:focus {
    border-color: #ff7f32;
    box-shadow: 0 0 0 4px rgba(255, 127, 50, 0.15);
    transform: translateY(-2px);
    background: #fff;
}

.form-control:hover:not(:focus) {
    border-color: #cbd5e0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.form-label {
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 0.6rem;
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

/* Button Styles */
.btn {
    border-radius: 10px;
    padding: 0.875rem 1.75rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
    transition: width 0.1s, height 0.1s;
}

.btn-primary {
    background: linear-gradient(135deg, #ff7f32 0%, #ff6b1f 100%);
    box-shadow: 0 6px 20px rgba(255, 127, 50, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 127, 50, 0.5);
    background: linear-gradient(135deg, #ff8c47 0%, #ff7a35 100%);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-danger {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    box-shadow: 0 6px 20px rgba(245, 101, 101, 0.4);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(245, 101, 101, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(72, 187, 120, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, #718096 0%, #4a5568 100%);
    color: #fff;
    box-shadow: 0 6px 20px rgba(113, 128, 150, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(113, 128, 150, 0.4);
}

/* Table Styles */
.table {
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}

.table th {
    border-top: none;
    background: linear-gradient(135deg, rgba(255, 127, 50, 0.12) 0%, rgba(255, 107, 31, 0.12) 100%);
    color: #1a202c;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    padding: 1.25rem 1rem;
    border-bottom: 2px solid rgba(255, 127, 50, 0.25);
}

.table td {
    vertical-align: middle;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid #f0f4f8;
    color: #4a5568;
    font-size: 0.95rem;
}

.table tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.table tbody tr:hover {
    background: linear-gradient(90deg, rgba(255, 127, 50, 0.08) 0%, transparent 100%);
    transform: scale(1.005);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 5px solid;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-danger {
    background: linear-gradient(135deg, rgba(245, 101, 101, 0.15) 0%, rgba(229, 62, 62, 0.15) 100%);
    color: #c53030;
    border-left-color: #f56565;
}

.alert-success {
    background: linear-gradient(135deg, rgba(72, 187, 120, 0.15) 0%, rgba(56, 161, 105, 0.15) 100%);
    color: #276749;
    border-left-color: #48bb78;
}

.alert-info {
    background: linear-gradient(135deg, rgba(66, 153, 225, 0.15) 0%, rgba(49, 130, 206, 0.15) 100%);
    color: #2c5282;
    border-left-color: #4299e1;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 127, 50, 0.15) 0%, rgba(255, 107, 31, 0.15) 100%);
    color: #9c4221;
    border-left-color: #ff7f32;
}

/* Login Page Styles */
.login-container {
    max-width: 480px;
    margin: 3rem auto;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    animation: scaleIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.login-card .card-body {
    padding: 3rem 2.5rem;
}

.login-card .card-title {
    background: linear-gradient(135deg, #ff7f32 0%, #ff6b1f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 2.5rem;
    letter-spacing: -0.5px;
}

/* Profile Page Styles */
.profile-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Loading Spinner */
.loading-spinner {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.loading-spinner::after {
    content: '';
    width: 70px;
    height: 70px;
    border: 5px solid rgba(255, 127, 50, 0.2);
    border-top: 5px solid #ff7f32;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    box-shadow: 0 0 30px rgba(255, 127, 50, 0.4);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.content-wrapper.loading {
    opacity: 0.4;
    pointer-events: none;
    filter: blur(4px);
    transition: all 0.3s ease;
}

/* User Management Styles */
.user-table {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Loading Spinner */
.spinner-border {
    width: 1.3rem;
    height: 1.3rem;
    margin-right: 0.5rem;
    border-width: 3px;
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, rgba(255, 127, 50, 0.12) 0%, rgba(255, 107, 31, 0.12) 100%);
    border-bottom: 2px solid rgba(255, 127, 50, 0.2);
    padding: 1.75rem 2rem;
}

.modal-title {
    font-weight: 800;
    color: #1a202c;
    font-size: 1.3rem;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1.5rem 2rem;
    background: #f8f9fa;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .sidebar {
        position: static;
        height: auto;
        padding: 1rem 0;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    }

    .sidebar::before {
        display: none;
    }
    
    .sidebar .nav-link {
        margin: 0.25rem 0.5rem;
    }
    
    main {
        margin-left: 0 !important;
        padding-top: 1rem;
    }

    .content-wrapper {
        padding: 1.5rem;
        border-radius: 16px;
    }

    .card {
        margin-bottom: 1rem;
    }

    .login-card .card-body {
        padding: 2rem 1.5rem;
    }
}

/* PWA Install Prompt */
.pwa-install-prompt {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    padding: 1.5rem 2rem;
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    display: none;
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translate(-50%, 30px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

.pwa-install-prompt.show {
    display: block;
}

/* Scrollbar Styles */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #1a202c;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff7f32 0%, #ff6b1f 100%);
    border-radius: 10px;
    border: 2px solid #1a202c;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #ff8c47 0%, #ff7a35 100%);
}

/* Badge Styles */
.badge {
    border-radius: 8px;
    padding: 0.4rem 0.75rem;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* Link Styles */
a {
    color: #ff7f32;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

a:hover {
    color: #ff6b1f;
    text-decoration: none;
    transform: translateX(2px);
}

/* Input Group Styles */
.input-group-text {
    background: linear-gradient(135deg, rgba(255, 127, 50, 0.12) 0%, rgba(255, 107, 31, 0.12) 100%);
    border: 2px solid #e2e8f0;
    border-right: none;
    color: #2d3748;
    font-weight: 700;
    border-radius: 10px 0 0 10px;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 10px 10px 0;
}

.input-group:focus-within .input-group-text {
    border-color: #ff7f32;
    background: linear-gradient(135deg, rgba(255, 127, 50, 0.18) 0%, rgba(255, 107, 31, 0.18) 100%);
}

.input-group:focus-within .form-control {
    border-color: #ff7f32;
}

/* Glow effects */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(255, 127, 50, 0.4);
    }
    50% {
        box-shadow: 0 0 30px rgba(255, 127, 50, 0.6);
    }
}

.btn-primary:focus {
    animation: glow 2s infinite;
}

/* Smooth transitions for all interactive elements */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container fluid adjustments */
.container-fluid {
    padding: 0;
}

/* Dark theme text colors */
.text-white {
    color: #fff !important;
}

.text-muted {
    color: #a0aec0 !important;
}

.print-button {
    position: fixed;
    top: 10px;
    right: 10px;
    padding: 8px 15px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    z-index: 1000;
}

.print-button:hover {
    background-color: #45a049;
}

@media print {
    .print-button {
        display: none;
    }
}