/* Custom CSS for Slog Way International */

:root {
    --primary-color: #007bff;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
}

/* Hero Section */
.hero-section {
    min-height: 60vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    position: relative;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 100" preserveAspectRatio="none"><polygon fill="rgba(255,255,255,0.1)" points="1000,0 1000,100 0,100"/></svg>') no-repeat bottom;
    background-size: 100% 100px;
}

/* Service Cards */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

.service-icon {
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

/* Form Styles */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-control-lg {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Alert styles */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Navbar styles */
.navbar-brand {
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255,255,255,0.8) !important;
}

/* Footer styles */
footer {
    background: linear-gradient(135deg, var(--dark-color) 0%, #212529 100%);
}

.social-links a {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: scale(1.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .hero-section {
        min-height: 50vh;
        text-align: center;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* File upload styling */
.form-control[type="file"] {
    padding: 0.5rem;
}

.form-control[type="file"]::-webkit-file-upload-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 0.25rem;
    margin-right: 1rem;
    cursor: pointer;
}

/* Form validation styles */
.was-validated .form-control:valid {
    border-color: var(--success-color);
}

.was-validated .form-control:invalid {
    border-color: var(--danger-color);
}

.was-validated .form-check-input:valid {
    border-color: var(--success-color);
}

.was-validated .form-check-input:invalid {
    border-color: var(--danger-color);
}

/* ===== BOOTSTRAP OFFCANVAS SIDEBAR STYLES ===== */

/* Professional desktop sidebar styling */
.admin-sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-right: 1px solid #e2e8f0;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
    height: calc(100vh - 56px); /* Adjust for navbar height */
    overflow-y: auto;
    width: 260px;
    position: fixed;
    top: 56px; /* Below navbar */
    left: 0;
    bottom: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

/* Collapsed sidebar */
.admin-sidebar.collapsed {
    width: 70px;
}

.admin-nav-link {
    color: #475569;
    padding: 12px 20px;
    margin: 4px 12px;
    border-radius: 12px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
}

.admin-sidebar.collapsed .admin-nav-link {
    justify-content: center;
    padding: 12px 5px;
    margin: 4px 8px;
}

.admin-sidebar.collapsed .admin-nav-link span:not(.nav-badge) {
    display: none;
}

.admin-nav-link:hover {
    background: #f1f5f9;
    color: #334155;
    text-decoration: none;
    transform: translateX(2px);
}

.admin-sidebar.collapsed .admin-nav-link:hover {
    transform: none;
}

.admin-nav-link.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.admin-nav-link.active:hover {
    transform: translateX(0);
}

.admin-nav-link.text-danger {
    color: #ef4444 !important;
}

.admin-nav-link.text-danger:hover {
    background: #fef2f2 !important;
    color: #dc2626 !important;
}

/* Badge styling */
.nav-badge {
    background: #ef4444;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    margin-left: auto;
    min-width: 20px;
    text-align: center;
}

.admin-nav-link.active .nav-badge {
    background: rgba(255, 255, 255, 0.2);
}

/* Brand section */
.sidebar-brand {
    padding: 24px 20px 16px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-sidebar.collapsed .sidebar-brand {
    justify-content: center;
    padding: 24px 5px 16px;
}

.admin-sidebar.collapsed .sidebar-brand .brand-text {
    display: none;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    flex-shrink: 0;
}

.brand-text h6 {
    margin: 0;
    font-weight: 700;
    color: #1e293b;
    font-size: 16px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.brand-text small {
    color: #64748b;
    font-size: 12px;
    line-height: 1.2;
}

/* Profile card */
.admin-profile-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 20px;
    margin: 20px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.admin-profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    margin: 0 auto 12px;
    display: block;
}

.admin-sidebar.collapsed .admin-profile-card {
    padding: 15px 5px;
    margin: 10px 5px;
}

.admin-sidebar.collapsed .admin-profile-card .profile-avatar {
    width: 36px;
    height: 36px;
    margin: 0 auto 5px;
}

.admin-sidebar.collapsed .admin-profile-card .profile-name,
.admin-sidebar.collapsed .admin-profile-card .profile-role {
    display: none;
}

/* Section titles */
.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin: 20px 20px 12px;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-sidebar.collapsed .nav-section-title {
    text-align: center;
    margin: 20px 5px 12px;
}

/* Mobile offcanvas customization */
.offcanvas-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.offcanvas-body {
    padding: 0;
}

/* Scrollbar styling */
.admin-sidebar::-webkit-scrollbar {
    width: 6px;
}

.admin-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.admin-sidebar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.admin-sidebar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Toggle button */
.sidebar-toggle {
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 101;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: #f1f5f9;
    transform: translateY(-50%) scale(1.1);
}

.admin-sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* Main content adjustment */
.admin-main-content {
    transition: all 0.3s ease;
    margin-left: 260px;
    padding-top: 70px;
    min-height: calc(100vh - 56px);
    width: calc(100% - 260px); /* Prevent horizontal scrolling */
}

.admin-sidebar.collapsed ~ .admin-main-content {
    margin-left: 70px;
    width: calc(100% - 70px); /* Adjust width when collapsed */
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .admin-sidebar {
        display: none !important;
    }
    
    .admin-main-content {
        margin-left: 0;
        width: 100%; /* Full width on mobile */
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        width: 220px;
    }
    
    .admin-nav-link {
        padding: 10px 15px;
        margin: 3px 8px;
        gap: 10px;
        font-size: 14px;
    }
    
    .brand-text h6 {
        font-size: 14px;
    }
    
    .brand-text small {
        font-size: 11px;
    }
    
    .nav-badge {
        font-size: 9px;
        padding: 3px 6px;
    }
    
    .admin-main-content {
        padding-top: 60px;
    }
}

/* Dashboard cards */
.dashboard-card {
    border: none;
    border-radius: 1rem;
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

.dashboard-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

/* Table styles */
.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table th {
    background: var(--light-color);
    border: none;
    font-weight: 600;
}

.table td {
    border: none;
    border-bottom: 1px solid #dee2e6;
    vertical-align: middle;
}

/* Status badges */
.status-pending {
    background: var(--warning-color);
    color: var(--dark-color);
}

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

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

/* Action buttons */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    margin: 0 0.125rem;
}

/* Modal styles */
.modal-content {
    border: none;
    border-radius: 1rem;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 1rem 1rem 0 0;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .card {
        background: #1a1a1a;
        color: white;
    }
    
    .table {
        --bs-table-bg: #1a1a1a;
        color: white;
    }
}