.signinbox hr {
    border: none;
    border-top: 0.2px solid #2f4b91; 
  
    width: 100%;
}

/* Layout & Base Body — theme aware without flashes */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    background: var(--iw-bg-shell, #020A27);
    position: relative;
}

body.iw-body-shell {
    background: var(--iw-bg-shell, #020A27) !important;
    background-color: var(--iw-bg-shell, #020A27) !important;
    animation: none !important;
}

body.iw-body-shell::before {
    display: none !important;
}

[data-theme="light"] body,
html[data-theme="light"] body {
    background: var(--iw-bg-shell, #EDF4FB) !important;
    background-color: var(--iw-bg-shell, #EDF4FB) !important;
    animation: none !important;
}

[data-theme="light"] body::before,
html[data-theme="light"] body::before {
    display: none !important;
}

/* Standalone Auth/Signin background */
body.auth-page,
.signin-body {
    background: linear-gradient(135deg, #0f0f23 0%, #1a1a2e 25%, #16213e 50%, #0f0f23 75%, #1a1a2e 100%);
    background-size: 400% 400%;
    background-repeat: no-repeat;
    background-attachment: fixed;
    animation: gradientShift 15s ease infinite;
}

body.auth-page::before,
.signin-body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 20%, rgba(81, 213, 90, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(96, 165, 250, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 60%, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.fade-in {
    animation: fadeIn 2s ease-in-out;
    animation-fill-mode: both;
}



.signintitle,
.signinbox {
   
    text-align: center;
    text-shadow: 0 0 3px 3px #3d9743;
   
}


.footer hr {
    border: none;
    border-top: 0.2px solid #314f9b; 
    margin: 10px auto;
    width: 80%;
}

.footer {
    position: fixed;
    bottom: 40px;
   
    text-align: center;
    font-family: "Overpass", sans-serif;
    font-weight: 200;
    font-size: 12px;
    color: rgb(168, 168, 168);
    padding: 10px 0;
  
}


.footer a {
    color: rgb(168, 168, 168);
    margin: 0 5px; 
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.container img {
    width: clamp(380px, 20%, 20%);
}

@keyframes fadeIn {
    from {
      opacity: 0;
    }
    to {
      opacity: 1;
    }
  }


.cmstitle {
    animation-fill-mode: both;
    animation: fadeIn 2s ease-in-out;
    font-family: "Onest", sans-serif;
    font-weight: 400;
    font-size: clamp(12px, 0.8vw, 0.9rem);
    color: #E3E3E3;
    width: 100%;
}

.signupbox2,
.signinbox {
    box-shadow: 0 0 20px 2px #304374;
    padding-left: clamp(20px, 2vw, 10px);
    padding-right: clamp(20px, 2vw, 10px);
    border-radius: 10px;
    background-color: #1D387B;
    width: clamp(300px, 20vw, 300px);
    height: auto;
    border: 0.5px solid #3d74ff;

}

.signintitle {
    color: #E3E3E3;
    font-size: clamp(25px, 0.5vw, 0.5rem);
    font-family: "Overpass", sans-serif;
    position: fixed;
    transform: translate(0, -300px);
    font-weight: 600;
    width: 100%;
}

.tfieldname {
    
    text-align: left;
    font-family: "Onest", sans-serif;
    font-weight: 500;
    color: #E3E3E3;
    margin-bottom: 5px;  
    margin-top: 15px;  
    font-size: clamp(12px, 1.5vw, 12px);
    width: auto;
}

.new-user-line {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    font-family: "Onest", sans-serif;
    font-size: clamp(12px, 1.5vw, 12px);
    color: #E3E3E3;
    padding-bottom: 8px;
}

.new-user-line .reglink a {
    color: #51D55A;
    text-decoration: none;
    font-weight: 500;
   
}

.new-user-line .reglink a:hover {
    text-decoration: underline;
}

.fieldrow {
    display: flex;
    justify-content: space-between; 
    align-items: center; 
    width: 100%; 
    margin: 0 auto; 
    
}

.aligned-fields {
    width: 100%; 
    display: flex;
    justify-content: space-between;
    gap: 20px;
}



.forgotpass {
    text-align: right;
    font-size: 10px;       
    font-family: "Onest", sans-serif;
    font-weight: 500;
    color: #E3E3E3;
    margin-bottom: 5px;  
    margin-top: 15px;  
}

.forgotpass a {
    font-weight: 300;
    color: #51D55A;
    text-decoration: none;
    font-size: clamp(12px, 1.5vw, 12px);
}

.forgotpass a:hover {
    text-decoration: underline;
}

.tf {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 5px;
    flex-direction: column;

    
}

.tf input {
    box-shadow: inset 0 2px 2px 2px rgba(0, 0, 0, 0.2);
    color: white;
    background-color: #13275B;
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #304374;
    font-family: "Onest", sans-serif;
    box-sizing: border-box;
}

.tf input:focus {
    outline: none;
    box-shadow: 0 0 0 1px #51D55A; 
}

.btnlogin {
    border: 0.2px solid transparent;
    font-family: "Onest", sans-serif;
    font-size: 12px;
    font-weight: 500;
    color: white;
    border-radius: 5px;
    background-color: #51D55A;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btnlogin:hover {
    cursor: pointer;
    background-color: #3d9743;
    border: 0.2px solid #51D55A;
    transform: scale(1.02);
}

.btnlogin:active {
    background-color: #3ea147;
    transform: scale(0.98);
}


.onest-regular {
    font-family: "Onest", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
}

.onest-medium {
    font-family: "Onest", sans-serif;
    font-optical-sizing: auto;
    font-weight: 500;
    font-style: normal;
}

.onest-light {
    font-family: "Onest", sans-serif;
    font-optical-sizing: auto;
    font-weight: 300;
    font-style: normal;
}

.overpass-semibold {
    font-family: "Overpass", sans-serif;
    font-optical-sizing: auto;
    font-weight: 600;
    font-style: normal;
}

.signupbox2 h3,
.signinbox h3 {
    font-family: "Overpass", sans-serif;
    color: #E3E3E3;
    font-size: 20px;
    margin-bottom: 5px;
  }

.signupbox2 .subtext,  
.signinbox .subtext {
    font-family: "Onest", sans-serif;
    font-size: clamp(12px, 1.2vw, 12px);
    color: #67e78c;
    margin-bottom: 10px;
  }

.signupbox2 h3,
.signupbox2 .subtext,
.signinbox h3,
.signinbox .subtext {

    text-align: left;
}


.header {
    margin-top: 50px;
    position: relative;
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
}

.header img {
    width: clamp(250px, 20%, 300px);
    animation: fadeIn 2s ease-in-out;
}

.cmstitle {
    animation: fadeIn 2s ease-in-out;
    font-family: "Onest", sans-serif;
    font-weight: 400;
    font-size: clamp(14px, 0.8vw, 0.9rem);
    color: #E3E3E3;
    margin-top: 5px;
}

.container {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; 
    padding-top: 40px; 
    padding-bottom: 80px;
}

.gender-options {
    display: flex;
    gap: 15px;
    margin-top: 10px;
 
}


.radio-wrap {
    position: relative;
    cursor: pointer;
  }

.radio-wrap input[type="radio"] {
    display: none; 
    
  }


.radio-label {
    display: flex;
    padding: 8px 14px;
    border-radius: 12px;
    background-color: #13275B;
    color: white;
    transition: 0.3s ease;
    border: 1px solid transparent;
    font-size: clamp(12px, 1.5vw, 12px);
    font-family: "Onest", sans-serif;
  }
  
  .radio-wrap:hover .radio-label {
    background-color: #1a3373;
    border-color: #51D55A;
    color: #51D55A;
  }
  
  .radio-wrap input[type="radio"]:checked + .radio-label {
    background-color: #51D55A;
    color: black;
    font-weight: 500;
    font-size: clamp(12px, 1.5vw, 12px);
    font-family: "Onest", sans-serif;
  }


  .faculty-join {
    display: flex;
    align-items: center;
    justify-content: center;
}

  .btnjoin {
    border: 0.2px solid transparent;
    font-family: "Onest", sans-serif;
    font-weight: 500;
    color: white;
    border-radius: 5px;
    background-color: #51D55A;
    padding: 10px 18px;
    cursor: pointer;
    font-size: clamp(12px, 1.5vw, 14px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease, transform 0.2s ease;
}



.btnjoin:hover {
    background-color: #4bc052;
    transform: scale(1.02);
    color: #1a3373;
}

.btnjoin:active {
    background-color: #3ea147;
    transform: scale(0.98);
}


/* ============================================================
   GLOBAL TOAST & VALIDATION SYSTEM
   Harmonized to Login Page Position & Color-Coded Validation:
   Error = Red (#ef4444) | Success = Green (#51D55A)
   Position: Fixed Bottom-Center (bottom: 30px; left: 50%)
   ============================================================ */
#toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 22px;
    border-radius: 12px;
    font-family: 'Onest', sans-serif;
    font-size: 14px;
    font-weight: 500;
    z-index: 100005;
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    pointer-events: auto;
    width: max-content;
    max-width: min(90vw, 550px);
    height: auto !important;
    max-height: 120px !important;
    white-space: normal;
    word-break: break-word;
    color: #ffffff;
}

#toast-container.show {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Error: Color-Coded RED */
#toast-container.error {
    background: rgba(45, 12, 18, 0.95);
    border: 1.5px solid #ef4444;
    color: #fee2e2;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.25);
}

/* Success: Color-Coded GREEN */
#toast-container.success {
    background: rgba(6, 44, 28, 0.95);
    border: 1.5px solid #51D55A;
    color: #d1fae5;
    box-shadow: 0 10px 30px rgba(81, 213, 90, 0.25);
}

/* Warning: Color-Coded AMBER */
#toast-container.warning {
    background: rgba(55, 35, 10, 0.95);
    border: 1.5px solid #fbbf24;
    color: #fef3c7;
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.25);
}

/* Info: Color-Coded BLUE */
#toast-container.info {
    background: rgba(16, 36, 75, 0.95);
    border: 1.5px solid #60a5fa;
    color: #dbeafe;
    box-shadow: 0 10px 30px rgba(96, 165, 250, 0.25);
}

/* Light Theme Overrides for Toasts */
[data-theme="light"] #toast-container {
    background: #FFFFFF !important;
    border-color: #D6E2F2 !important;
    box-shadow: 0 8px 30px rgba(20, 80, 158, 0.18), 0 0 0 1px rgba(20, 80, 158, 0.08) !important;
    color: #0B1526 !important;
}

[data-theme="light"] #toast-container.error {
    background: #fef2f2 !important;
    border-color: #ef4444 !important;
    color: #991b1b !important;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.15) !important;
}

[data-theme="light"] #toast-container.success {
    background: #f0fdf4 !important;
    border-color: #22c55e !important;
    color: #166534 !important;
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.15) !important;
}

[data-theme="light"] #toast-container.warning {
    background: #fffbeb !important;
    border-color: #f59e0b !important;
    color: #92400e !important;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.15) !important;
}

[data-theme="light"] #toast-container.info {
    background: #eff6ff !important;
    border-color: #3b82f6 !important;
    color: #1e40af !important;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.15) !important;
}

#toast-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    flex-shrink: 0 !important;
}

#toast-icon svg {
    width: 20px !important;
    height: 20px !important;
    min-width: 20px !important;
    min-height: 20px !important;
    max-width: 20px !important;
    max-height: 20px !important;
    flex-shrink: 0 !important;
    display: block !important;
}

#toast-message {
    font-size: 14px;
    line-height: 1.4;
    color: inherit;
    flex: 1;
}

#toast-container:has(.toast-box) {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    pointer-events: auto !important;
}

/* Field Validation Border: Color-Coded RED for Error */
.error-border,
.premium-input.error-border,
.tf input.error-border,
input.error-border,
select.error-border,
textarea.error-border {
    border: 1.5px solid #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
    outline: none !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* Field Validation Border: Color-Coded GREEN for Success / Match */
.success-border,
.match-border,
.premium-input.success-border,
input.match-border {
    border: 1.5px solid #51D55A !important;
    box-shadow: 0 0 0 3px rgba(81, 213, 90, 0.25) !important;
    outline: none !important;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

@keyframes shake {
    0% { transform: translateX(0); }
    20% { transform: translateX(-8px); }
    40% { transform: translateX(8px); }
    60% { transform: translateX(-8px); }
    80% { transform: translateX(8px); }
    100% { transform: translateX(0); }
  }
  

.shake {
  animation: shake 0.4s ease-in-out;;
}


.sidebar-item {
  @apply flex items-center px-7 py-3 h-[53px] border-2 border-[#2A4484] text-[16px] font-onest text-[#E3E3E3] font-[400] rounded-[10px] hover:bg-[#13275B] active:border-[#51D55A] cursor-pointer transition;
}

.sidebar-icon {
  @apply w-[22px] mr-[22px];
}

.sidebar-text {
  @apply transition-all duration-300;
}

#sidebar.collapsed .sidebar-text {
  display: none;
}

#sidebar.collapsed {
  width: 80px;
}

#sidebar.collapsed #sidebar-logo {
  content: url("../img/cdicon.svg");
  width: 40px;
}

#sidebar.collapsed #sidebar-desc {
  display: none;
}

#sidebar.collapsed .sidebar-create {
  display: none;
}

#sidebar.collapsed #chevron-icon {
  transform: rotate(180deg);
}

.registration-title {
    display: flex;
    align-items: center;
    font-family: "Overpass", sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #222;
    gap: 10px; /* space between arrow and text */
}

.back-arrow {
    cursor: pointer;
        transition: all 0.2s ease;
        background: transparent;
        border: none;
        padding: 4px;
        color: #ffffff;
        border-radius: 4px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.3s, transform 0.2s;
}

.back-arrow:hover {
    transform: translateX(-2px);
    background: rgba(255, 255, 255, 0.1);
}

.back-arrow:active {
    background-color: #162f80;
    transform: translateX(-2px) scale(0.95);
}


#chevron-icon {
    transition: transform 0.3s ease-in-out;
}

/* Premium Design System */
.card,
.premium-card {
    background: linear-gradient(145deg, rgba(29, 56, 123, 0.95) 0%, rgba(18, 39, 91, 0.95) 100%);
    border: 1px solid rgba(42, 68, 132, 0.6);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(81, 213, 90, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.card:hover,
.premium-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(81, 213, 90, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(81, 213, 90, 0.3);
}

.card-title {
    color: #E3E3E3;
    font-weight: 600;
    font-family: 'Overpass', sans-serif;
    font-size: 16px;
    margin-bottom: 16px;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(19, 39, 91, 0.8);
    color: #E3E3E3;
    font-size: 11px;
    font-weight: 600;
    font-family: 'Onest', sans-serif;
    white-space: nowrap;
}

.badge.out_of_stock,
.badge.high,
.badge.high-demand {
    background: #ef4444 !important;
    color: #fff !important;
}

.badge.low_stock,
.badge.medium,
.badge.medium_moving,
.badge.attention_needed,
.badge.medium_demand {
    background: #f59e0b !important;
    color: #fff !important;
}

.badge.in_stock,
.badge.good,
.badge.normal,
.badge.fast_moving,
.badge.low {
    background: #10b981 !important;
    color: #fff !important;
}

.input,
.premium-input {
    background: rgba(19, 39, 91, 0.8);
    color: #E3E3E3;
    border: 1px solid rgba(48, 67, 116, 0.6);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: 'Onest', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 100%;
}

.input:focus,
.premium-input:focus {
    outline: none;
    border-color: #51D55A;
    box-shadow: 
        0 0 0 3px rgba(81, 213, 90, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
    background: rgba(19, 39, 91, 0.9);
}

select.premium-input,
select.input {
    appearance: auto;
    -webkit-appearance: menulist;
    cursor: pointer;
    padding-right: 32px;
}

select.premium-input:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px;
    border-bottom: 1px solid rgba(42, 68, 132, 0.35);
    color: #E3E3E3;
    font-family: 'Onest', sans-serif;
    font-size: 13px;
    text-align: left;
}

.table th {
    background: rgba(19, 39, 91, 0.9);
}

.table th.text-center, .table td.text-center { text-align: center !important; }
.table th.text-right, .table td.text-right { text-align: right !important; }
.table th.text-left, .table td.text-left { text-align: left !important; }

.label {
    color: #E3E3E3;
    font-family: 'Onest', sans-serif;
    font-size: 12px;
    margin-bottom: 6px;
    display: block;
}

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal-box {
    width: min(95%, 600px);
    background: rgba(19, 39, 91, 0.95);
    border: 1px solid rgba(42, 68, 132, 0.6);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    overflow: hidden;
}

.modal-box .modal-header,
.modal-box .modal-footer,
.modal-box .modal-body {
    padding: 20px;
}

.modal-box .modal-header {
    border-bottom: 1px solid rgba(42, 68, 132, 0.5);
}

.modal-box .modal-footer {
    border-top: 1px solid rgba(42, 68, 132, 0.5);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.premium-input::-webkit-outer-spin-button,
.premium-input::-webkit-inner-spin-button,
.input::-webkit-outer-spin-button,
.input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.premium-input[type=number],
.input[type=number] {
    -moz-appearance: textfield;
}

.premium-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(81, 213, 90, 0.5), transparent);
}

.premium-card:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 12px 40px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(81, 213, 90, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(81, 213, 90, 0.3);
}

.btn,
.btn-primary,
.premium-button,
.button-primary {
    background: linear-gradient(135deg, #51D55A 0%, #4BC052 100%);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Onest', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 
        0 4px 12px rgba(81, 213, 90, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn::before,
.btn-primary::before,
.button-primary::before,
.premium-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover,
.btn-primary:hover,
.premium-button:hover,
.button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 20px rgba(81, 213, 90, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-secondary,
.button-secondary,
.btn-outline {
    background: rgba(81, 213, 90, 0.12);
    color: #51D55A;
    border: 1.5px solid rgba(81, 213, 90, 0.45);
    border-radius: 12px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Onest', sans-serif;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(81, 213, 90, 0.1);
    user-select: none;
}

.btn-secondary:hover,
.button-secondary:hover,
.btn-outline:hover {
    background: linear-gradient(135deg, #51D55A 0%, #43B74B 100%);
    color: #ffffff !important;
    border-color: #51D55A;
    box-shadow: 0 4px 16px rgba(81, 213, 90, 0.4);
    transform: translateY(-1.5px);
}
.btn-secondary:hover svg,
.button-secondary:hover svg,
.btn-outline:hover svg {
    stroke: #ffffff;
    color: #ffffff;
}

.btn-danger,
.button-danger,
.btn-destructive {
    background: transparent;
    color: #f87171;
    border: 1px solid rgba(248, 113, 113, 0.4);
    border-radius: 12px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Onest', sans-serif;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-danger:hover,
.button-danger:hover,
.btn-destructive:hover {
    background: rgba(248, 113, 113, 0.1);
}

.btn[disabled],
.premium-button:disabled,
.btn-primary:disabled,
.btn-secondary:disabled,
.btn-danger:disabled,
.button-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.premium-input {
    background: rgba(19, 39, 91, 0.8);
    color: #E3E3E3;
    border: 1px solid rgba(48, 67, 116, 0.6);
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: 'Onest', sans-serif;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.premium-input:focus {
    outline: none;
    border-color: #51D55A;
    box-shadow: 
        0 0 0 3px rgba(81, 213, 90, 0.1),
        inset 0 2px 4px rgba(0, 0, 0, 0.1);
    background: rgba(19, 39, 91, 0.9);
}

.premium-sidebar {
    background: linear-gradient(180deg, #1D387B 0%, #13275B 100%);
    border-right: 1px solid rgba(42, 68, 132, 0.6);
    box-shadow: 
        4px 0 20px rgba(0, 0, 0, 0.3),
        inset -1px 0 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    /* Updated to allow smooth toggling */
    transition: margin-left 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.premium-menu-item {
    border: 1px solid rgba(42, 68, 132, 0.6);
    color: #E3E3E3;
    border-radius: 12px;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: 'Onest', sans-serif;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.premium-menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(81, 213, 90, 0.1), transparent);
    transition: left 0.5s;
}

.premium-menu-item:hover {
    background: linear-gradient(135deg, rgba(19, 39, 91, 0.8) 0%, rgba(29, 56, 123, 0.6) 100%);
    border-color: rgba(81, 213, 90, 0.3);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.premium-menu-item:hover::before {
    left: 100%;
}

.premium-header {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.1),
        0 1px 0 rgba(255, 255, 255, 0.8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
}

.premium-metric {
    color: #E3E3E3;
    font-family: 'Onest', sans-serif;
    font-size: 14px;
    font-weight: 500;
}

.premium-metric .num {
    font-size: 28px;
    font-weight: 700;
    font-family: 'Overpass', sans-serif;
    background: linear-gradient(135deg, #51D55A 0%, #4BC052 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(81, 213, 90, 0.3);
}

.premium-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.premium-table th {
    background: var(--iw-bg-table-head, #13275B);
    color: #E3E3E3;
    padding: 16px;
    font-family: 'Onest', sans-serif;
    font-weight: 600;
    font-size: 14px;
    text-align: left;
    border-bottom: 2px solid rgba(81, 213, 90, 0.3);
}

.premium-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(42, 68, 132, 0.3);
    color: #E3E3E3;
    font-family: 'Onest', sans-serif;
    font-size: 14px;
    transition: background-color 0.2s;
}

.premium-table tbody tr:hover td {
    background: rgba(81, 213, 90, 0.05);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #51D55A;
    object-fit: cover;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(81, 213, 90, 0.3);
}

.user-avatar:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(81, 213, 90, 0.4);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-info:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.neon-glow {
    box-shadow: 
        0 0 20px rgba(81, 213, 90, 0.3),
        0 0 40px rgba(81, 213, 90, 0.1),
        0 0 60px rgba(81, 213, 90, 0.05);
}

.premium-scrollbar::-webkit-scrollbar {
    width: 8px;
}

.premium-scrollbar::-webkit-scrollbar-track {
    background: rgba(19, 39, 91, 0.3);
    border-radius: 4px;
}

.premium-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #51D55A 0%, #4BC052 100%);
    border-radius: 4px;
    transition: all 0.3s;
}

.premium-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #4BC052 0%, #3EA147 100%);
}

/* --- Added sidebar hidden state --- */

.sidebar-hidden {
    margin-left: -290px !important;
    opacity: 0;
    pointer-events: none;
}

/* Offline-resilient app shell — navigation works without Tailwind CDN */
html {
    height: 100%;
    background-color: var(--iw-bg-shell, #020A27);
}

[data-theme="light"] html,
html[data-theme="light"] {
    background-color: #EDF4FB !important;
}

[data-theme="dark"] html,
html[data-theme="dark"] {
    background-color: #020A27 !important;
}

body {
    margin: 0;
    min-height: 100%;
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
}

.iw-body-shell {
    width: 100%;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 12px 12px 0;
    box-sizing: border-box;
}

.iw-main-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: row;
    border-radius: 15px 15px 0 0;
    overflow: hidden;
    min-height: 0;
}

#main-sidebar {
    width: 290px;
    min-width: 290px;
    max-width: 290px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    transition: margin-left 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

#main-sidebar > div:first-child {
    margin-left: 8px;
    margin-bottom: 16px;
    flex-shrink: 0;
}

#main-sidebar > div:nth-child(2) {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
}

#main-sidebar > div:last-child {
    margin-top: auto;
    padding: 8px;
    flex-shrink: 0;
}

.iw-main-wrapper > div:not(#main-sidebar) {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.premium-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.premium-admin-header > div:first-child {
    display: flex;
    align-items: center;
    gap: 16px;
}

.iw-main-content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.iw-avatar-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #51D55A;
    background: linear-gradient(135deg, #1D387B 0%, #13275B 100%);
    color: #fff;
    font-weight: 700;
    font-family: 'Onest', 'Inter', system-ui, sans-serif;
    line-height: 1;
    flex-shrink: 0;
    user-select: none;
    object-fit: cover;
}

.iw-avatar-initials--sm {
    width: 20px;
    height: 20px;
    font-size: 8px;
    border-width: 1px;
}

.iw-avatar-initials--md {
    width: 32px;
    height: 32px;
    font-size: 11px;
}

.iw-empty-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    color: #9aa6d1;
}

.iw-empty-state-icon svg {
    width: 48px;
    height: 48px;
}

#toast-icon svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ============================================================
   RESPONSIVE DESIGN — IntelliWare WIMS
   Breakpoints: mobile < 640px | tablet 640-1023px | desktop 1024px+
   ============================================================ */

/* --- Mobile & Tablet Sidebar Overlay Drawer --- */
#sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#sidebar-overlay.active {
    display: block;
    opacity: 1;
    pointer-events: all;
}

/* ---- Tablet (640px – 1024px) -------------------------------- */
@media (max-width: 1024px) {

    /* Body shell: remove outer ring padding so more space is used */
    .iw-body-shell {
        padding: 0 !important;
    }

    /* Main wrapper: square corners at top on tablet/mobile */
    .iw-main-wrapper {
        border-radius: 0 !important;
        height: 100vh !important;
    }

    /* Sidebar becomes a fixed overlay drawer starting directly below the header */
    #main-sidebar {
        position: fixed !important;
        top: 65px !important;
        left: 0 !important;
        height: calc(100vh - 65px) !important;
        width: 270px !important;
        min-width: 270px !important;
        max-width: 270px !important;
        z-index: 9999 !important;
        transform: translateX(0) !important;
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease-in-out !important;
        overflow-y: auto !important;
        box-shadow: 4px 0 32px rgba(0, 0, 0, 0.5) !important;
        margin-left: 0 !important;
        padding-top: 6px !important;
    }

    /* Hide logo inside drawer since header is already visible at the top */
    #main-sidebar > div:first-child {
        display: none !important;
    }

    /* Hidden state: slide out to the left */
    #main-sidebar.sidebar-hidden {
        transform: translateX(-100%) !important;
        margin-left: 0 !important;
        opacity: 1 !important;
        pointer-events: none !important;
    }

    /* Content area takes full width (sidebar is overlay) */
    .iw-main-wrapper > div:not(#main-sidebar) {
        width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 100% !important;
    }

    /* Header: tighten padding on tablet */
    .premium-admin-header {
        padding-left: 18px !important;
        padding-right: 18px !important;
        height: auto !important;
        min-height: 58px !important;
    }

    /* Content area padding */
    .iw-main-content {
        padding: 14px 18px !important;
    }

    /* --- Tablet typography scale --- */
    h2, .text-3xl { font-size: 1.3rem !important; }
    h3, .text-2xl { font-size: 1.05rem !important; }
    .text-xl      { font-size: 0.975rem !important; }
    .text-lg      { font-size: 0.925rem !important; }

    /* Metric numbers on tablet */
    .premium-metric .num,
    .num.text-3xl { font-size: 1.55rem !important; }

    /* Card padding on tablet */
    .premium-card.p-6, .card.p-6 { padding: 14px !important; }
    .premium-card.p-8, .card.p-8 { padding: 16px !important; }

    /* Grid gap reduction on tablet */
    .gap-6 { gap: 12px !important; }
    .gap-8 { gap: 14px !important; }

    /* 4-col grids → 2-col on tablet */
    .lg\:grid-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* ---- Mobile (< 640px) --------------------------------------- */
@media (max-width: 639px) {

    /* ---- Header ---- */
    .premium-admin-header {
        padding-left: 10px !important;
        padding-right: 10px !important;
        min-height: 50px !important;
        flex-wrap: nowrap !important;
        gap: 6px !important;
    }

    /* Hide user name/role text — keep avatar icon only */
    .user-details { display: none !important; }

    /* User profile pill: icon-only */
    .user-profile {
        padding: 4px 6px !important;
        gap: 0 !important;
        border-radius: 8px !important;
    }

    /* Shrink avatar on mobile */
    .user-avatar {
        width: 28px !important;
        height: 28px !important;
        border-width: 1px !important;
    }

    /* Theme toggle & notification bell: smaller */
    .theme-toggle,
    .notification-bell {
        width: 30px !important;
        height: 30px !important;
        border-radius: 7px !important;
    }
    .theme-toggle svg { width: 15px !important; height: 15px !important; }
    .notification-bell svg { width: 15px !important; height: 15px !important; }

    /* Notification dropdown: fit screen width */
    .notification-dropdown {
        min-width: 250px !important;
        max-width: calc(100vw - 20px) !important;
        right: -6px !important;
    }

    /* User dropdown: fit small screens */
    .user-dropdown {
        right: -6px !important;
        min-width: 160px !important;
    }
    .dropdown-item { padding: 9px 12px !important; font-size: 12px !important; }

    /* Header page title */
    .iw-header-title {
        font-size: 12px !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 110px;
    }

    /* Hamburger button */
    .iw-sidebar-toggle svg { width: 18px !important; height: 18px !important; }

    /* ---- Content area padding ---- */
    .iw-main-content {
        padding: 8px !important;
    }


    /* ---- Typography scale-down ---- */
    h1, .text-4xl  { font-size: 1.15rem !important; }
    h2, .text-3xl  { font-size: 1rem !important; }
    h3, .text-2xl  { font-size: 0.9rem !important; }
    .text-xl       { font-size: 0.85rem !important; }
    .text-lg       { font-size: 0.8rem !important; }
    .text-base     { font-size: 0.78rem !important; }
    .text-sm       { font-size: 0.72rem !important; }
    .text-xs       { font-size: 0.65rem !important; }

    /* JIT arbitrary text sizes */
    .text-\[20px\] { font-size: 14px !important; }
    .text-\[18px\] { font-size: 13px !important; }
    .text-\[16px\] { font-size: 12px !important; }
    .text-\[15px\] { font-size: 11.5px !important; }
    .text-\[14px\] { font-size: 11px !important; }
    .text-\[13px\] { font-size: 10.5px !important; }
    .text-\[12px\] { font-size: 10px !important; }
    .text-\[11px\] { font-size: 9.5px !important; }
    .text-\[10px\] { font-size: 9px !important; }

    /* ---- Metric cards ---- */
    .premium-metric .num,
    .num.text-3xl { font-size: 1.3rem !important; }

    /* Metric icon box */
    .w-12.h-12 { width: 34px !important; height: 34px !important; }
    .w-12.h-12 svg { width: 18px !important; height: 18px !important; }

    /* Card section icon boxes (w-9 h-9) */
    .w-9.h-9 { width: 30px !important; height: 30px !important; }

    /* ---- Card / panel padding ---- */
    .premium-card,
    .card {
        padding: 10px !important;
        border-radius: 10px !important;
    }
    /* Override all Tailwind padding utilities on cards */
    .premium-card.p-3, .card.p-3,
    .premium-card.p-4, .card.p-4,
    .premium-card.p-5, .card.p-5,
    .premium-card.p-6, .card.p-6,
    .premium-card.p-8, .card.p-8,
    .premium-card.p-10, .card.p-10 {
        padding: 10px !important;
    }

    /* Inner panel headers (border-b dividers) */
    .p-5 { padding: 8px 10px !important; }
    .p-4 { padding: 7px 9px !important; }
    .p-3 { padding: 5px 7px !important; }
    .p-2 { padding: 4px 5px !important; }

    /* ---- Spacing / gaps ---- */
    .gap-6 { gap: 8px !important; }
    .gap-5 { gap: 7px !important; }
    .gap-4 { gap: 6px !important; }
    .gap-3 { gap: 5px !important; }
    .gap-2 { gap: 4px !important; }
    .mb-6  { margin-bottom: 8px !important; }
    .mb-5  { margin-bottom: 7px !important; }
    .mb-4  { margin-bottom: 6px !important; }
    .mb-3  { margin-bottom: 5px !important; }
    .space-y-4 > * + * { margin-top: 7px !important; }
    .space-y-3 > * + * { margin-top: 5px !important; }

    /* ---- Grid columns: single column default on mobile ---- */
    .grid-cols-2,
    .sm\:grid-cols-2,
    .md\:grid-cols-2,
    .grid-cols-3,
    .md\:grid-cols-3,
    .grid-cols-4,
    .md\:grid-cols-4,
    .lg\:grid-cols-2,
    .lg\:grid-cols-3,
    .lg\:grid-cols-4 {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }

    /* Stat metric cards: 2-per-row so they're compact side-by-side */
    .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    /* ---- Buttons ---- */
    .btn,
    .btn-primary,
    .btn-secondary,
    .btn-danger,
    .button-primary,
    .button-secondary,
    .button-danger,
    .premium-button {
        padding: 7px 12px !important;
        font-size: 11px !important;
        border-radius: 7px !important;
        min-height: 34px !important;
        gap: 5px !important;
    }

    /* ---- Inputs / selects / textareas ---- */
    .input,
    .premium-input,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    input[type="search"],
    select,
    textarea {
        padding: 7px 9px !important;
        font-size: 12px !important;
        border-radius: 7px !important;
        min-height: 34px !important;
    }

    /* Labels */
    .label, label { font-size: 10.5px !important; margin-bottom: 3px !important; }

    /* ---- Tables ---- */
    .premium-table th,
    .premium-table td,
    .table th,
    .table td {
        padding: 7px 8px !important;
        font-size: 10.5px !important;
    }
    .premium-table,
    .table { min-width: 500px; }

    /* ---- Badges ---- */
    .badge {
        padding: 2px 6px !important;
        font-size: 9px !important;
        border-radius: 999px !important;
    }

    /* ---- Modals ---- */
    .modal-box {
        width: min(96vw, 600px) !important;
        max-height: 92vh !important;
        overflow-y: auto !important;
        border-radius: 10px !important;
    }
    .modal-box .modal-body   { padding: 10px !important; }
    .modal-box .modal-header,
    .modal-box .modal-footer { padding: 10px !important; }
    .modal-box .modal-footer { flex-wrap: wrap !important; gap: 7px !important; }
    .modal-box .modal-footer .btn,
    .modal-box .modal-footer .btn-secondary,
    .modal-box .modal-footer .btn-danger,
    .modal-box .modal-footer .btn-primary,
    .modal-box .modal-footer .button-primary,
    .modal-box .modal-footer .button-secondary,
    .modal-box .modal-footer .button-danger {
        width: 100% !important;
        justify-content: center !important;
    }

    /* ---- Dashboard fixed-height panels → auto height ---- */
    .h-\[400px\],
    .h-\[380px\],
    .h-\[350px\],
    .h-\[320px\],
    .h-\[300px\] {
        height: auto !important;
        min-height: 180px !important;
        max-height: 280px !important;
    }

    /* ---- Sidebar menu items: more compact ---- */
    .premium-menu-item {
        padding: 9px 11px !important;
        font-size: 12.5px !important;
        border-radius: 8px !important;
    }
    .sidebar-icon { width: 17px !important; height: 17px !important; margin-right: 9px !important; }
    .sidebar-text { font-size: 12.5px !important; }

    /* ---- Hero banner elements ---- */
    .hero-product-card { padding: 9px !important; gap: 8px !important; }
    .hero-forecast-btn,
    a.hero-forecast-btn {
        padding: 6px 11px !important;
        font-size: 11px !important;
        border-radius: 8px !important;
    }

    /* ---- Card title ---- */
    .card-title {
        font-size: 11px !important;
        margin-bottom: 7px !important;
    }
}

/* ---- Responsive table horizontal scroll utility ------------- */
.iw-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Sticky first column in scrollable tables */
.iw-table-scroll .premium-table td:first-child,
.iw-table-scroll .premium-table th:first-child,
.iw-table-scroll .table td:first-child,
.iw-table-scroll .table th:first-child {
    position: sticky;
    left: 0;
    z-index: 1;
    background: inherit;
}