/**
 * Custom CSS for Construction Management App
 */

/* General Styles */
:root {
    --primary-blue: #0a308f;
    --primary-dark: #0a349c;
    --primary-light: #0754d0;
    --secondary-blue: #e8f0fe;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.16);
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8edf5 100%);
    min-height: 100vh;
}

/* Company Logo */
.company-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #e7f1ff, #d4e4ff);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* User Avatar */
.user-avatar {
    border: 2px solid rgba(13, 110, 253, 0.2);
    transition: all 0.3s ease;
}

.user-avatar:hover {
    border-color: var(--primary-blue);
    transform: scale(1.05);
}

/* Main Content */
.main-content {
    min-height: calc(100vh - 160px);
    padding-bottom: 20px;
}

/* Footer */
.footer {
    border-top: 1px solid #e2e8f0;
    margin-top: auto;
}

/* Card Styles */
.card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Dashboard Card */
.dashboard-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    height: 100%;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-light));
    opacity: 0;
    transition: var(--transition);
}

.dashboard-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.dashboard-card:hover::before {
    opacity: 1;
}

.dashboard-card .icon-wrapper {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    font-size: 32px;
    color: white;
    transition: var(--transition);
}

.dashboard-card .icon-wrapper[data-color="blue"] {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.dashboard-card .icon-wrapper[data-color="green"] {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.dashboard-card .icon-wrapper[data-color="red"] {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.dashboard-card .icon-wrapper[data-color="orange"] {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.dashboard-card .icon-wrapper[data-color="purple"] {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.dashboard-card .icon-wrapper[data-color="pink"] {
    background: linear-gradient(135deg, #ec4899, #db2777);
}

.dashboard-card .icon-wrapper[data-color="teal"] {
    background: linear-gradient(135deg, #14b8a6, #0d9488);
}

.dashboard-card .icon-wrapper[data-color="indigo"] {
    background: linear-gradient(135deg, #6366f1, #4f46e5);
}

.dashboard-card:hover .icon-wrapper {
    transform: scale(1.1) rotate(-5deg);
}

.dashboard-card h5 {
    font-weight: 600;
    margin-bottom: 6px;
    color: #1e293b;
}

.dashboard-card p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 8px;
}

.dashboard-card .card-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    background: #e8edf5;
    color: #475569;
}

/* Welcome Section */
.welcome-section {
    background: white;
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin-bottom: 32px;
    box-shadow: var(--shadow-sm);
}

.welcome-section h3 {
    color: #1e293b;
    font-weight: 700;
}

.welcome-section h3 span {
    color: var(--primary-blue);
}

/* Animations */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

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

.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }
.animate-delay-6 { animation-delay: 0.6s; }
.animate-delay-7 { animation-delay: 0.7s; }
.animate-delay-8 { animation-delay: 0.8s; }
.animate-delay-9 { animation-delay: 0.9s; }

/* Login/Register Pages */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    max-width: 450px;
    width: 100%;
    box-shadow: var(--shadow-lg);
}

.auth-card .logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-card .logo i {
    font-size: 48px;
    color: var(--primary-blue);
    background: var(--secondary-blue);
    padding: 16px;
    border-radius: 16px;
}

.auth-card h2 {
    color: #1e293b;
    font-weight: 700;
    text-align: center;
    margin-bottom: 4px;
}

.auth-card .subtitle {
    text-align: center;
    color: #64748b;
    margin-bottom: 28px;
}

.auth-card .form-label {
    font-weight: 500;
    color: #334155;
}

.auth-card .btn-primary {
    background: var(--primary-blue);
    border: none;
    padding: 10px 32px;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
}

.auth-card .btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.auth-card .btn-outline-secondary:hover {
    background: #f1f5f9;
}

.auth-link {
    text-align: center;
    margin-top: 16px;
    color: #64748b;
}

.auth-link a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Form Styles */
.form-control {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 10px 14px;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
}

.input-group .btn {
    border-radius: 0 8px 8px 0;
}

/* ============================================================
   PREMIUM HEADER STYLES (ADDED)
   ============================================================ */

/* Premium Header */
.premium-header {
    background: linear-gradient(135deg, #1E5EFF 0%, #2563eb 50%, #3b82f6 100%);
    padding: 12px 0;
    box-shadow: 0 4px 24px rgba(30, 94, 255, 0.25);
    position: sticky;
    top: 0;
    z-index: 1050;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
}

/* Left Side */
.header-left {
    display: flex;
    align-items: center;
}

.header-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
    transition: transform 0.3s ease;
}

.header-brand:hover {
    transform: scale(1.02);
}

.brand-icon {
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-name {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    color: white;
    font-size: 18px;
    letter-spacing: -0.3px;
}

.brand-tagline {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    font-size: 11px;
    letter-spacing: 0.3px;
}

/* Right Side */
.header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

.header-btn {
    width: 42px;
    height: 42px;
    border: none;
    background: rgba(255,255,255,0.12);
    border-radius: 12px;
    color: white;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.header-btn:hover {
    background: rgba(255,255,255,0.22);
    transform: translateY(-2px);
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    border: 2px solid #1E5EFF;
}

.menu-dots-btn i {
    font-size: 20px;
}

/* User Profile */
.header-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    border: none;
    background: rgba(255,255,255,0.1);
    border-radius: 30px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.header-user:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 14px;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.user-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    text-align: left;
}

.user-name {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    color: white;
    font-size: 13px;
}

.user-role {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 400;
    color: rgba(255,255,255,0.6);
    font-size: 10px;
    letter-spacing: 0.3px;
}

.user-chevron {
    color: rgba(255,255,255,0.6);
    font-size: 12px;
    transition: transform 0.3s ease;
}

.header-user[aria-expanded="true"] .user-chevron {
    transform: rotate(180deg);
}

/* Premium Dropdown */
.premium-dropdown {
    border: none;
    border-radius: 18px !important;
    padding: 10px;
    min-width: 240px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.12);
    margin-top: 12px;
    animation: dropdownSlide 0.3s ease;
}

@keyframes dropdownSlide {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.premium-dropdown .dropdown-header {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 11px;
    color: #6b7a8f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 14px 4px;
}

.premium-dropdown .dropdown-divider {
    margin: 6px 0;
    border-color: #eef2f6;
}

.premium-dropdown .dropdown-item {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 500;
    font-size: 14px;
    color: #1a2332;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.premium-dropdown .dropdown-item:hover {
    background: #f0f4f9;
    transform: translateX(4px);
}

.premium-dropdown .dropdown-item i {
    font-size: 16px;
    width: 20px;
}

.user-dropdown .dropdown-item i {
    font-size: 16px;
    width: 24px;
}

/* ============================================================
   FLOATING NAVIGATION STYLES (ADDED)
   ============================================================ */

/* Floating Navigation */
.floating-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 30px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 6px 8px;
    z-index: 1050;
    display: none;
    max-width: 95%;
}

.floating-nav-inner {
    display: flex;
    align-items: center;
    gap: 2px;
}

.floating-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 20px;
    transition: all 0.3s ease;
    min-width: 48px;
    position: relative;
    color: #94a3b8;
    border: none;
    background: transparent;
}

.floating-item i {
    font-size: 20px;
    transition: all 0.3s ease;
}

.floating-item .floating-label {
    font-size: 9px;
    margin-top: 2px;
    font-weight: 600;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.floating-item:hover {
    color: #1E5EFF;
    background: rgba(30, 94, 255, 0.06);
    transform: translateY(-2px);
}

.floating-item.active {
    color: white;
    background: linear-gradient(135deg, #1E5EFF, #3b82f6);
    box-shadow: 0 4px 12px rgba(30, 94, 255, 0.3);
}

.floating-item.active i {
    color: white;
}

.floating-item.active .floating-label {
    color: white;
}

.floating-item.active::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #1E5EFF;
    box-shadow: 0 0 12px rgba(30, 94, 255, 0.4);
}

/* Floating Grid Items for More Modal */
.floating-grid-item {
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 8px 4px;
    border-radius: 12px;
}

.floating-grid-item:hover {
    background: #f0f4f9;
    transform: scale(1.05);
}

.floating-grid-item i {
    font-size: 22px;
    display: block;
    margin-bottom: 2px;
}

.floating-grid-item small {
    font-size: 9px;
    color: #6b7a8f;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* Show floating navigation on mobile and tablet */
@media (max-width: 992px) {
    .floating-nav {
        display: block;
    }
    
    .main-content {
        padding-bottom: 90px;
    }
    
    .footer {
        padding-bottom: 80px;
    }
}

/* Floating nav responsive adjustments */
@media (max-width: 480px) {
    .floating-item {
        padding: 4px 8px;
        min-width: 36px;
    }
    
    .floating-item i {
        font-size: 16px;
    }
    
    .floating-item .floating-label {
        font-size: 7px;
    }
    
    .floating-nav {
        bottom: 12px;
        padding: 4px 6px;
        border-radius: 24px;
    }
}

/* Hide floating nav on desktop */
@media (min-width: 993px) {
    .floating-nav {
        display: none !important;
    }
}

/* ============================================================
   RESPONSIVE HEADER (ADDED)
   ============================================================ */

@media (max-width: 768px) {
    .header-content {
        padding: 0 16px;
    }
    
    .brand-name {
        font-size: 15px;
    }
    
    .brand-tagline {
        font-size: 10px;
    }
    
    .user-info {
        display: none;
    }
    
    .header-user {
        padding: 4px;
        border-radius: 50%;
        background: rgba(255,255,255,0.12);
    }
    
    .header-user:hover {
        background: rgba(255,255,255,0.2);
    }
    
    .header-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    
    .brand-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }
    
    .premium-dropdown {
        min-width: 200px;
    }
}

@media (max-width: 480px) {
    .brand-icon {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }
    
    .brand-name {
        font-size: 13px;
    }
    
    .brand-tagline {
        font-size: 9px;
    }
    
    .header-btn {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    .user-avatar {
        width: 30px;
        height: 30px;
        font-size: 12px;
    }
}

/* ============================================================
   FLOATING NAV ANIMATION (ADDED)
   ============================================================ */

.floating-nav {
    animation: floatIn 0.5s ease;
}

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