/* Ensure full height layout */
html, body {
    height: 100%;
    margin: 0;
}

/* Main wrapper (page layout) */
body {
    display: flex;
    flex-direction: column;
}

/* Page content grows */
.page {
    flex: 1;
}

/* Footer stays at bottom */
footer {
    margin-top: auto;
}



/* AVFS Professional - Complete Stylesheet */

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    background: #f1f5f9; 
    color: #1e293b; 
}

.container { 
    max-width: 1400px; 
    margin: 0 auto; 
    padding: 0 20px; 
}

/* NAVIGATION */
nav {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    padding: 15px 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo { 
    font-size: 24px; 
    font-weight: bold; 
    color: white; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.nav-right { 
    display: flex; 
    gap: 15px; 
    align-items: center; 
}

nav button {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    cursor: pointer;
    font-size: 14px;
    padding: 10px 20px;
    border-radius: 6px;
    transition: all 0.3s;
}

nav button:hover { 
    background: rgba(255,255,255,0.3); 
}

.btn-logout { 
    background: #ef4444; 
    border: none; 
}

.btn-logout:hover { 
    background: #dc2626; 
}

/* PAGES */
.page { 
    display: none; 
}

.page.active { 
    display: block; 
}

/* LANDING PAGE */
.landing {
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    min-height: 100vh;
}

.landing h1 { 
    font-size: 48px; 
    margin-bottom: 20px; 
    color: #059669; 
}

.landing .subtitle { 
    font-size: 18px; 
    color: #64748b; 
    margin-bottom: 50px; 
}

.hero-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.hero-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.hero-card:hover { 
    transform: translateY(-5px); 
    border-color: #059669; 
}

.hero-card i { 
    font-size: 50px; 
    color: #059669; 
    margin-bottom: 20px; 
}

.hero-card h3 { 
    font-size: 24px; 
    margin-bottom: 15px; 
}

.hero-card p { 
    color: #64748b; 
    line-height: 1.6; 
}

.btn-primary {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    padding: 14px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-primary:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 6px 12px rgba(5,150,105,0.3); 
}

.btn-secondary {
    background: #94a3b8;
    color: white;
    padding: 14px 40px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.btn-secondary:hover {
    background: #64748b;
}

/* FORMS */
.form-container {
    max-width: 500px;
    margin: 50px auto;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.form-container h2 { 
    margin-bottom: 10px; 
    color: #1e293b; 
}

.form-container p { 
    color: #64748b; 
    margin-bottom: 30px; 
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #334155;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-group button {
    width: 100%;
    padding: 12px;
    background: #059669;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.form-group button:hover { 
    background: #047857; 
}

.form-group button:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.form-link { 
    text-align: center; 
    margin-top: 20px; 
}

.form-link a { 
    color: #059669; 
    text-decoration: none; 
    cursor: pointer; 
    font-weight: 600; 
}

.form-link a:hover { 
    text-decoration: underline; 
}

.demo-info {
    background: linear-gradient(135deg, #dbeafe, #e0f2fe);
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    font-size: 13px;
    color: #0c4a6e;
    border-left: 4px solid #0ea5e9;
}

/* DASHBOARD */
.dashboard {
    display: flex;
    gap: 30px;
    padding: 30px 0;
    min-height: 90vh;
}

.sidebar {
    width: 280px;
    background: white;
    padding: 30px;
    border-radius: 12px;
    height: fit-content;
    position: sticky;
    top: 80px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.sidebar .user-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.user-avatar {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 20px;
}

.sidebar .nav-section { 
    margin-bottom: 25px; 
}

.sidebar .nav-title { 
    font-size: 11px; 
    text-transform: uppercase; 
    color: #94a3b8; 
    font-weight: 700; 
    margin-bottom: 12px; 
    letter-spacing: 0.5px; 
}

.sidebar .nav-link {
    display: block;
    padding: 12px;
    background: none;
    border: none;
    cursor: pointer;
    border-radius: 8px;
    color: #64748b;
    font-weight: 500;
    transition: all 0.3s;
    width: 100%;
    text-align: left;
    margin-bottom: 6px;
}

.sidebar .nav-link:hover { 
    background: #f1f5f9; 
    transform: translateX(5px); 
}

.sidebar .nav-link.active { 
    background: #d1fae5; 
    color: #047857; 
    font-weight: 600; 
}

.logout-btn {
    width: 100%;
    padding: 12px;
    background: #fee2e2;
    color: #dc2626;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    margin-top: 20px;
}

.logout-btn:hover { 
    background: #fecaca; 
}

.main-content {
    flex: 1;
}

/* STATS */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-left: 4px solid #059669;
    transition: transform 0.3s;
}

.stat-card:hover { 
    transform: translateY(-3px); 
}

.stat-card .label { 
    font-size: 13px; 
    color: #64748b; 
    margin-bottom: 8px; 
    font-weight: 600; 
}

.stat-card .value { 
    font-size: 32px; 
    font-weight: 700; 
    color: #059669; 
}

/* FILTERS */
.filters {
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.filter-group { 
    display: flex; 
    gap: 10px; 
    align-items: center; 
}

.filter-group label { 
    font-weight: 600; 
    font-size: 14px; 
    color: #475569; 
}

.filter-group select,
.filter-group input {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
}

/* CARDS */
.cards-container { 
    display: grid; 
    gap: 20px; 
}

.demand-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s;
    border-left: 4px solid #059669;
}

.demand-card:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 8px 12px rgba(0,0,0,0.15); 
}

.card-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: start; 
    margin-bottom: 15px; 
    flex-wrap: wrap; 
}

.card-title { 
    font-size: 22px; 
    font-weight: 700; 
    color: #1e293b; 
}

.tags { 
    display: flex; 
    gap: 8px; 
    margin-bottom: 10px; 
    flex-wrap: wrap; 
}

.tag {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.tag-open { 
    background: #fef3c7; 
    color: #92400e; 
}

.tag-partial { 
    background: #dbeafe; 
    color: #1e40af; 
}

.tag-fulfilled { 
    background: #dcfce7; 
    color: #166534; 
}

.tag-high { 
    background: #fee2e2; 
    color: #991b1b; 
}

.tag-medium { 
    background: #dbeafe; 
    color: #1e40af; 
}

.tag-low { 
    background: #f1f5f9; 
    color: #475569; 
}

.card-info-box {
    background: #f8fafc;
    padding: 15px;
    border-radius: 8px;
}

.info-label { 
    font-size: 12px; 
    color: #64748b; 
    font-weight: 600; 
    margin-bottom: 4px; 
}

.info-value { 
    font-size: 14px; 
    font-weight: 600; 
    color: #1e293b; 
}

.progress-bar {
    background: #e2e8f0;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #059669, #10b981);
    transition: width 0.3s;
}

.offers-section {
    background: #f0fdf4;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    border-left: 4px solid #059669;
}

.offer-item {
    margin-top: 10px;
    padding: 10px;
    background: white;
    border-radius: 6px;
    font-size: 13px;
    border-left: 3px solid #0ea5e9;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.btn-action {
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-supply { 
    background: #059669; 
    color: white; 
}

.btn-supply:hover { 
    background: #047857; 
    transform: translateY(-2px); 
}

.btn-edit { 
    background: #0ea5e9; 
    color: white; 
}

.btn-edit:hover { 
    background: #0284c7; 
}

.btn-delete { 
    background: #ef4444; 
    color: white; 
}

.btn-delete:hover { 
    background: #dc2626; 
}

.btn-accept { 
    background: #10b981; 
    color: white; 
}

.btn-accept:hover { 
    background: #059669; 
}

.btn-reject { 
    background: #f59e0b; 
    color: white; 
}

.btn-reject:hover { 
    background: #d97706; 
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
    background: white;
    border-radius: 12px;
}

.empty-state i { 
    font-size: 48px; 
    opacity: 0.3; 
    margin-bottom: 20px; 
}

.empty-state h3 { 
    font-size: 20px; 
    font-weight: 600; 
    margin-bottom: 8px; 
}

.empty-state p { 
    font-size: 14px; 
}

/* MODAL */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active { 
    display: flex; 
}

.modal-content {
    background: white;
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    margin-bottom: 30px; 
}

.modal-header h2 { 
    font-size: 24px; 
    font-weight: 700; 
}

.close-btn { 
    background: none; 
    border: none; 
    font-size: 24px; 
    cursor: pointer; 
    color: #64748b; 
}

.close-btn:hover { 
    color: #1e293b; 
}

/* TOAST */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    padding: 16px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 2000;
    animation: slideIn 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.toast.success { 
    background: linear-gradient(135deg, #059669, #047857); 
}

.toast.error { 
    background: linear-gradient(135deg, #ef4444, #dc2626); 
}

.toast.info { 
    background: linear-gradient(135deg, #0ea5e9, #0284c7); 
}

@keyframes slideIn {
    from { 
        transform: translateX(400px); 
        opacity: 0; 
    }
    to { 
        transform: translateX(0); 
        opacity: 1; 
    }
}

.grid-2 { 
    display: grid; 
    grid-template-columns: 1fr 1fr; 
    gap: 15px; 
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .dashboard { 
        flex-direction: column; 
    }
    
    .sidebar { 
        width: 100%; 
        position: static; 
    }
    
    .grid-2 { 
        grid-template-columns: 1fr; 
    }
    
    .hero-cards { 
        grid-template-columns: 1fr; 
    }
    
    nav .container { 
        flex-direction: column; 
        gap: 15px; 
    }
    
    .landing h1 { 
        font-size: 32px; 
    }
    
    .card-header {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .form-container {
        padding: 20px;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .stat-card .value {
        font-size: 24px;
    }
}
/* FOOTER */
.footer {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: white;
    padding: 30px 0;
    margin-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-content p {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
}

.footer-content strong {
    font-weight: 700;
    color: #d1fae5;
}

/*seperate forms for registeration*/
/* =========================
   REGISTRATION TYPE CARDS
========================= */
.register-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 cards in one row */
    gap: 16px;
    margin-top: 20px;
}

.register-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px 16px;
    background: #ffffff;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.register-card:hover {
    border-color: rgb(4, 120, 87);
    box-shadow: 0 10px 24px rgba(4, 120, 87);
    transform: translateY(-4px);
}

.register-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin: 8px 0 4px;
    color: #1e293b;
}

.register-card p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

/* =========================
   REGISTRATION FORM ONLY
========================= */
.register-container .form-group {
    margin-bottom: 20px;
}

.register-container label {
    font-size: 13px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 6px;
    display: block;
}

.register-container input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border-radius: 10px;
    border: 1px solid #cbd5f5;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
}

.register-container input:focus {
    border-color: #047857;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.18);
}

/* =========================
   REGISTER BUTTON ONLY
========================= */
.register-container button {
    width: 100%;
    padding: 11px;
    border-radius: 12px;
    border: none;
    font-size: 15px;
    font-weight: 600;
    background: #6366f1;
    color: white;
    cursor: pointer;
    transition: all 0.25s ease;
}

.register-container button:hover {
    background: #047857;
    box-shadow: 0 12px 26px rgba(79, 70, 229, 0.35);
    transform: translateY(-2px);
}

/* =========================
   CLOSE BUTTON (TOP RIGHT)
========================= */
.register-container {
    position: relative;
}

.register-container .close-btn {
    position: absolute;
    top: 14px;
    right: 16px;
    font-size: 24px;
    line-height: 1;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.register-container .close-btn:hover {
    color: #ef4444;
    transform: scale(1.1);
}

/* Time and date styling*/
.nav-datetime {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-right: 20px;
  padding: 6px 16px 6px 0;
  border-right: 1px solid rgba(255, 255, 255, 0.28);
  min-width: 200px;
  text-align: center;

  /* 👇 move date + time together to the right */
  transform: translateX(10px);
}

/* Date line */
.nav-date {
  font-size: 12px;
  font-weight: 600;
  color: #ecfdf5;
  letter-spacing: 0.35px;
  line-height: 1.3;
}

/* Time line – nudged right */
.nav-time {
  font-size: 13px;
  font-weight: 500;
  color: #d1fae5;
  font-family: "JetBrains Mono", monospace;
  margin-top: 3px;
  line-height: 1.4;

  /* 👇 subtle right shift */
  padding-left: 4px;
}

/* ========================================================================
   NOTIFICATION INDICATORS & ANIMATIONS
   ======================================================================== */

/* Pulse animation for unread badge */
@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
}

/* Badge pulse */
#notificationBadge {
    animation: pulse 2s infinite;
}

/* Bell shake animation on new notification */
@keyframes bellShake {
    0%, 100% {
        transform: rotate(0deg);
    }
    10%, 30% {
        transform: rotate(-10deg);
    }
    20%, 40%, 60%, 80% {
        transform: rotate(10deg);
    }
    50%, 70% {
        transform: rotate(-10deg);
    }
    90% {
        transform: rotate(10deg);
    }
}

#notificationBell.has-unread {
    animation: bellShake 0.5s ease-in-out;
}

/* Hover effect for notification bell */
#notificationBell:hover {
    color: #fbbf24;
    transform: scale(1.15);
}

/* Bounce animation for when new notification arrives */
@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px);
    }
}

.notification-new {
    animation: bounce 0.6s ease-in-out;
}

/* Unread notification styling */
.notification-unread {
    border-left-color: #3b82f6 !important;
    background: #eff6ff !important;
    position: relative;
}

.notification-unread::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #3b82f6, #0ea5e9);
    border-radius: 2px 0 0 2px;
}

.notification-badge-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #3b82f6;
    border-radius: 50%;
    margin-right: 8px;
    animation: pulse 1.5s infinite;
}

/* Sidebar Notification Button with Unread */
#sidebarNotificationBtn.nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#sidebarNotificationBtn:has(#sidebarNotificationBadge[style*="display: flex"]) {
    background: #e8f5e9 !important;
    border-left: 3px solid #10b981 !important;
    font-weight: 600;
    color: #059669 !important;
}

#sidebarNotificationBadge {
    animation: pulse 2s infinite;
}

/* Toast notification for new notification arrival */
@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    background: white;
    border-left: 4px solid #0ea5e9;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    max-width: 400px;
    animation: slideInDown 0.4s ease-out;
}

.notification-toast strong {
    color: #1e293b;
    display: block;
    margin-bottom: 4px;
}

.notification-toast small {
    color: #64748b;
    display: block;
}

.notification-toast.success {
    border-left-color: #10b981;
}

.notification-toast.success strong {
    color: #059669;
}
/* Profile Edit Styles */
.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.info-label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.info-value {
    font-size: 16px;
    color: #1f2937;
    font-weight: 500;
}