/* --- Core Variables & Reset --- */
:root {
    --bg: #050505;
    --accent: #7000ff;
    --cyan: #00f2fe;
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.1);
    --text: #ffffff;
    --text-dim: #94a3b8;
    --neon-green: #39ff14; /* <--- ADD THIS LINE */
    --neon-green: #39ff14;
    --neon-red: #ff3131;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body { 
    background: radial-gradient(circle at top right, #1e1b4b, #050505, #0f172a);
    color: var(--text); 
    font-family: 'Sora', sans-serif;
    min-height: 100vh;
    overflow-x: hidden; /* Stops horizontal scattering */
}

.btn-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-family: 'Sora', sans-serif;
    text-decoration: none;
    transition: 0.3s;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 0.85rem;
}

/* --- Received Style (Green) --- */
.btn-received {
    background: rgba(57, 255, 20, 0.05);
    border-color: rgba(57, 255, 20, 0.3);
    color: var(--neon-green);
}

.btn-received:hover {
    background: var(--neon-green);
    color: #000;
    box-shadow: 0 0 15px rgba(57, 255, 20, 0.3);
}

/* --- Not Received Style (Red) --- */
.btn-not-received {
    background: rgba(255, 49, 49, 0.05);
    border-color: rgba(255, 49, 49, 0.3);
    color: var(--neon-red);
}

.btn-not-received:hover {
    background: var(--neon-red);
    color: #fff;
    box-shadow: 0 0 15px rgba(255, 49, 49, 0.3);
}
/* Success Overlay Styles */
.success-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.4s ease;
}

.success-modal {
    background: var(--glass);
    border: 1px solid var(--border);
    padding: 3rem;
    border-radius: 30px;
    text-align: center;
    box-shadow: 0 0 50px rgba(112, 0, 255, 0.2);
}

.success-icon {
    font-size: 5rem;
    color: var(--neon-green);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 15px rgba(57, 255, 20, 0.4));
    animation: scaleUp 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Success Modal SVG Animation */
.success-icon-svg {
    width: 100px;
    height: 100px;
    display: block;
    margin: 0 auto 1.5rem;
}

.checkmark-circle {
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    stroke-width: 2;
    stroke-miterlimit: 10;
    stroke: var(--neon-green);
    fill: none;
    animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
    transform-origin: 50% 50%;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    stroke: var(--neon-green);
    stroke-width: 3;
    fill: none;
    animation: stroke 0.3s cubic-bezier(0.65, 0, 0.45, 1) 0.8s forwards;
}
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top right, #1e1b4b, #050505);
}

.auth-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    padding: 3rem;
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-logo {
    font-size: 2rem;
    font-weight: 800;
    color: var(--cyan);
    margin-bottom: 2rem;
}

.auth-logo span { color: var(--accent); }
/* --- Form Header Styling --- */
.page-header h2 {
    color: var(--cyan);
    font-weight: 800;
    margin-bottom: 8px;
}

/* --- Container & Card Fix --- */
.form-container {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
}

/* Overriding the display:block style to ensure padding looks good */
.form-container .glass-card {
    display: block !important;
    padding: 2.5rem;
    background: var(--glass);
    border: 1px solid var(--border);
    backdrop-filter: blur(15px);
}

/* --- Input Fields (Textboxes, Dropdowns, TextAreas) --- */
.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.85rem;
    color: var(--text-dim);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* This targets all ASP.NET TextBoxes and DropDowns */
.form-control {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white !important;
    font-family: 'Sora', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    outline: none;
}

/* Specific fix for MultiLine (Textarea) */
textarea.form-control {
    min-height: 120px;
    resize: vertical;
    line-height: 1.5;
}

.form-control:focus {
    border-color: var(--cyan);
    background: rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.1);
}

/* --- Button Styling --- */
.btn-submit {
    background: linear-gradient(135deg, var(--accent), #4f46e5);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
    transition: 0.3s;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(112, 0, 255, 0.4);
    filter: brightness(1.1);
}

/* Fix for Date/Time picker icons in Chrome/Safari */
input::-webkit-calendar-picker-indicator {
    filter: invert(1);
    cursor: pointer;
}
/* Target the dropdown itself */
.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05) !important; /* Semi-transparent */
    border: 1px solid var(--border);
    border-radius: 12px;
    color: white !important;
    font-family: 'Sora', sans-serif;
    appearance: none; /* Removes default browser arrow to allow custom styling */
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* CRITICAL: Target the dropdown items (the list that pops out) */
.form-control option {
    background-color: #1e1b4b; /* Deep Navy/Midnight color to match your theme */
    color: white;
    padding: 10px;
}

/* Optional: Add a custom arrow since 'appearance: none' removes the default one */
.form-group {
    position: relative;
}

.dropdown-wrapper::after {
    content: '\f078'; /* FontAwesome chevron-down */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: 15px;
    top: 40px;
    color: var(--text-dim);
    pointer-events: none;
}
.btn-submit {
            background: linear-gradient(135deg, var(--accent), #4f46e5);
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 12px;
            font-weight: 700;
            cursor: pointer;
            width: 100%;
            transition: 0.3s;
            margin-top: 10px;
        }
        .btn-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 20px rgba(112, 0, 255, 0.3);
        }
.app-container { display: flex; min-height: 100vh; }
/* --- Layout Structure --- */
.app-container { 
    display: flex; 
    flex-direction: column; /* Mobile Default */
}

/* --- Sidebar / Topbar --- */
.sidebar {
    width: 100%;
    background: rgba(0, 0, 0, 0.4); 
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border); 
    padding: 1rem 1.5rem;
    z-index: 1000;
}

.brand { font-size: 1.4rem; font-weight: 800; color: var(--cyan); }
.brand span { color: var(--accent); }

/* The Menu Toggle Button */
.mobile-menu-toggle {
    display: block;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text);
}

/* Mobile Header Row */
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Navigation Links --- */
.side-nav {
    display: none; /* Hidden on mobile by default */
    flex-direction: column;
    gap: 8px;
    margin-top: 1rem;
}

.side-nav.active { display: flex; } /* Shown when toggled */

.side-nav a {
    padding: 12px;
    color: var(--text-dim);
    text-decoration: none;
    background: var(--glass);
    border-radius: 10px;
    border: 1px solid transparent;
}

.side-nav a.active { border-color: var(--accent); color: white; }

/* --- Main Content --- */
.main-wrapper { flex: 1; width: 100%; }

.top-header {
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

/* --- REDUCED USER ICON --- */
.avatar { 
    width: 32px; /* Was 45px, now smaller */
    height: 32px; 
    border-radius: 50%; 
    border: 1.5px solid var(--accent); 
    object-fit: cover;
}

.middle-panel { padding: 1.5rem; }

/* --- Grid & Table --- */
.card-grid { 
    display: grid; 
    grid-template-columns: 1fr; 
    gap: 15px; 
}

/* --- Table Container --- */
/* --- Table Container --- */
.table-container { 
    background: var(--glass); 
    border-radius: 24px; 
    border: 1px solid var(--border); 
    margin-top: 25px;
    
    /* Constraint Logic */
    width: 100%;
    max-width: 90%; /* Limits width to 90% of parent */
    margin-left: 0;  /* Aligns container to the left */
    margin-right: auto;
    font-size:10pt;
    /* Scroll Logic */
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; /* Smooth swipe for mobile */
}

/* --- The Table --- */
/* --- Image Thumbnail in Table --- */
.table-img-preview {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border);
    transition: 0.3s ease;
    cursor: zoom-in;
}

.table-img-preview:hover {
    transform: scale(1.2);
    border-color: var(--cyan);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}
.glass-table { 
    width: 100%; 
    border-collapse: collapse; 
    text-align: left;
    
    /* Force scrollbar to appear on small screens */
    /* Adjust this value based on how many columns you have */
    min-width: 800px; 
}

/* --- Responsive Alignment Fix --- */
.glass-table th, 
.glass-table td { 
    padding: 18px 20px; 
    border-bottom: 1px solid var(--border);
    white-space: nowrap; /* Prevents text from wrapping to a second line */
}

.glass-table th {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
}
/* --- Status Badges (Inside Table) --- */
.badge { 
    padding: 6px 12px; 
    border-radius: 8px; 
    font-size: 0.75rem; 
    font-weight: 700; 
    display: inline-block;
}

.status-success { 
    background: rgba(57, 255, 20, 0.1); 
    color: var(--neon-green); 
    border: 1px solid rgba(57, 255, 20, 0.2);
}

.status-pending { 
    background: rgba(245, 158, 11, 0.1); 
    color: #f59e0b; 
    border: 1px solid rgba(245, 158, 11, 0.2);
}

/* CARDS */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.glass-card {
    background: var(--glass); border: 1px solid var(--border); backdrop-filter: blur(10px);
    padding: 25px; border-radius: 24px; display: flex; align-items: center; gap: 20px; transition: 0.3s;
}
.glass-card:hover { transform: translateY(-5px); border-color: var(--accent); }
.active-card { background: linear-gradient(135deg, var(--accent), #4f46e5); border: none; cursor: pointer; }
.icon-box { font-size: 1.5rem; color: var(--cyan); width: 50px; height: 50px; background: rgba(255,255,255,0.05); display: flex; align-items: center; justify-content: center; border-radius: 12px; }
.active-card .icon-box { color: white; background: rgba(255,255,255,0.2); }
.card-data .label { font-size: 0.75rem; color: var(--text-dim); text-transform: uppercase; font-weight: 600; }
.card-data .value { font-size: 1.5rem; font-weight: 700; }


/* Optional: Add a soft glow pulse to the whole modal */
.success-modal {
    animation: modalPulse 2s infinite;
}


/*for auth*/
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: radial-gradient(circle at top right, #1e1b4b, #050505);
}
/* --- 2. DESKTOP OVERRIDES (Width > 1024px) --- */
@keyframes stroke {
    100% { stroke-dashoffset: 0; }
}

@keyframes modalPulse {
    0% { box-shadow: 0 0 30px rgba(112, 0, 255, 0.2); }
    50% { box-shadow: 0 0 50px rgba(57, 255, 20, 0.2); }
    100% { box-shadow: 0 0 30px rgba(112, 0, 255, 0.2); }
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scaleUp { from { transform: scale(0); } to { transform: scale(1); } }
@media (min-width: 1024px) {
    .app-container { flex-direction: row; }

    .sidebar {
        width: 260px;
        height: 100vh;
        position: sticky;
        top: 0;
        border-right: 1px solid var(--border);
        border-bottom: none;
        padding: 2rem 1.5rem;
    }

    .header-row { display: block; } /* Brand on top */
    .mobile-menu-toggle { display: none; } /* Hide toggle icon */
    
    .side-nav { 
        display: flex !important; 
        margin-top: 3rem;
    }

    .card-grid { grid-template-columns: repeat(3, 1fr); }
    
    .middle-panel { padding: 3rem; }
}