/* ============================================================
   NetSuite OTP Login + Invoice Dashboard CSS
   ============================================================ */

:root {
    --otp-primary:  #2D66B1;
    --otp-dark:     #11162B;
    --otp-gradient: linear-gradient(135deg, #2D66B1, #11162B);
    --otp-white:    #ffffff;
    --otp-input-bg: #eef3fb;
    --otp-border:   #d0dff0;
    --otp-muted:    #6b7a99;
    --otp-success:  #2ecc71;
    --otp-error:    #e74c3c;
    --otp-radius:   12px;
    --otp-shadow:   0 20px 60px rgba(17,22,43,0.35);
}

/* ---- HEADER BUTTON ---- */
.otp-nav-item { display:flex !important; align-items:center !important; margin-left:12px; }
.otp-header-btn { background:var(--otp-gradient); color:#fff !important; border:none; padding:9px 22px; border-radius:50px; font-size:14px; font-weight:600; cursor:pointer; transition:all 0.25s; box-shadow:0 4px 15px rgba(45,102,177,0.35); white-space:nowrap; }
.otp-header-btn:hover { transform:translateY(-2px); box-shadow:0 8px 25px rgba(45,102,177,0.5); }
.otp-user-greeting { color:var(--otp-white); font-size:15px; font-weight:500; margin-right:8px; }
.otp-logout-btn { background:transparent; color:var(--otp-muted) !important; border:1px solid var(--otp-border); padding:6px 14px; border-radius:50px; font-size:13px; text-decoration:none !important; cursor:pointer; transition:all 0.2s; }
.otp-logout-btn:hover { border-color:var(--otp-primary); color:var(--otp-primary) !important; }

/* ---- OVERLAY ---- */
.otp-overlay { position:fixed; inset:0; background:rgba(17,22,43,0.7); backdrop-filter:blur(6px); z-index:999999; align-items:center; justify-content:center; padding:16px; }
.otp-overlay.otp-open { display:flex !important; }

/* ---- MODAL ---- */
.otp-modal { background:#fff; border-radius:20px; padding:40px 36px; width:100%; max-width:420px; position:relative; box-shadow:var(--otp-shadow); animation:otpSlideUp 0.3s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes otpSlideUp { from{transform:translateY(30px);opacity:0} to{transform:translateY(0);opacity:1} }
.otp-close { position:absolute; top:16px; right:18px; background:none; border:none; font-size:24px; color:var(--otp-muted); cursor:pointer; padding:4px 8px; border-radius:6px; transition:all 0.2s; }
.otp-close:hover { background:var(--otp-input-bg); color:var(--otp-dark); }
.otp-logo { display:flex; justify-content:center; margin-bottom:16px; }
.otp-title { font-size:22px !important; font-weight:700 !important; color:var(--otp-dark) !important; text-align:center; margin:0; }
.otp-subtitle { font-size:14px; color:var(--otp-muted); text-align:center; margin:0 0 15px !important; line-height:1.5; padding: 0; }
.otp-subtitle strong { color:var(--otp-primary); font-weight:600; }

/* ---- FORM ---- */
.otp-field-group { margin-bottom:20px; }
.otp-field-group label { display:block; font-size:13px; font-weight:600; color:var(--otp-primary); margin-bottom:8px; }
.otp-req { color:var(--otp-error); }
.otp-phone-wrap { display:flex; gap:8px; }
.otp-country-select { background:var(--otp-input-bg); border:2px solid var(--otp-border); border-radius:var(--otp-radius); padding:11px 8px; font-size:14px; color:#11162B; cursor:pointer; outline:none; min-width:70px; transition:border-color 0.2s; appearance:none; -webkit-appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7a99' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 8px center; padding-right:24px; }
.otp-country-select:focus { border-color:var(--otp-primary); }
.otp-input { flex:1; width: 100%; background:var(--otp-input-bg) !important; border:2px solid var(--otp-border) !important; border-radius:var(--otp-radius) !important; padding:12px 16px !important; font-size:15px !important; color:#11162B !important; outline:none !important; transition:all 0.2s !important; }
.otp-input:focus { border-color:var(--otp-primary) !important; box-shadow:0 0 0 3px rgba(45,102,177,0.15) !important; background:#fff !important; }

/* ---- OTP BOXES ---- */
.otp-boxes-wrap { display:flex; gap:8px; justify-content:center; margin:0 0 20px; }
.otp-box { width:46px !important; height:54px !important; text-align:center !important; font-size:22px !important; font-weight:700 !important; color:#11162B !important; background:var(--otp-input-bg) !important; border:2px solid var(--otp-border) !important; border-radius:10px !important; outline:none !important; transition:all 0.15s !important; caret-color:transparent; padding:0 !important; }
.otp-box:focus { border-color:var(--otp-primary) !important; background:#fff !important; box-shadow:0 0 0 3px rgba(45,102,177,0.15) !important; transform:scale(1.05); }
.otp-box.filled { border-color:var(--otp-primary) !important; background:#e8f0fb !important; }
.otp-box.error-box { border-color:var(--otp-error) !important; animation:otpShake 0.4s ease; }
@keyframes otpShake { 0%,100%{transform:translateX(0)} 20%{transform:translateX(-4px)} 40%{transform:translateX(4px)} 60%{transform:translateX(-4px)} 80%{transform:translateX(4px)} }

/* ---- BUTTONS ---- */
.otp-primary-btn { width:100%; background:var(--otp-gradient); color:#fff !important; border:none; border-radius:50px; padding:14px 24px; font-size:15px; font-weight:600; cursor:pointer; transition:all 0.25s; box-shadow:0 4px 18px rgba(45,102,177,0.4); display:flex; align-items:center; justify-content:center; gap:8px; margin-bottom:16px; }
.otp-primary-btn:hover:not(:disabled) { transform:translateY(-2px); box-shadow:0 8px 25px rgba(45,102,177,0.55); }
.otp-primary-btn:disabled { opacity:0.65; cursor:not-allowed; }
.otp-spinner { display:inline-block; width:16px; height:16px; border:2px solid rgba(255,255,255,0.4); border-top-color:#fff; border-radius:50%; animation:otpSpin 0.6s linear infinite; }
@keyframes otpSpin { to{transform:rotate(360deg)} }
.otp-resend-wrap { display:flex; justify-content:center; }
.otp-link-btn { background:none; border:none; color:var(--otp-muted); font-size:13px; cursor:pointer; padding:0; transition:color 0.2s; }
.otp-link-btn:hover { color:var(--otp-primary); text-decoration:underline; }

/* ---- MESSAGES ---- */
.otp-message { padding:10px 14px; border-radius:8px; font-size:13px; font-weight:500; margin-bottom:16px; }
.otp-message.success { background:#e8f8ef; color:#1a7a45; border-left:3px solid var(--otp-success); }
.otp-message.error { background:#fdf0f0; color:#c0392b; border-left:3px solid var(--otp-error); }

/* ---- SUCCESS ---- */
.otp-success-icon { display:flex; justify-content:center; margin-bottom:20px; animation:otpPop 0.5s cubic-bezier(0.34,1.56,0.64,1); }
@keyframes otpPop { from{transform:scale(0);opacity:0} to{transform:scale(1);opacity:1} }

/* ============================================================
   INVOICE DASHBOARD
   ============================================================ */
/* ============================================================
   INVOICE DASHBOARD
   ============================================================ */
.ns-dashboard {
    max-width: 1500px;
    margin: 0 auto;
    padding: 32px 24px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-sizing: border-box;
}

.ns-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--otp-gradient);
    color: #fff;
    padding: 28px 32px;
    border-radius: 16px;
    margin-bottom: 28px;
    gap: 16px;
    flex-wrap: wrap;
}

.ns-customer-info {
    flex: 1;
    min-width: 0;
    
}

.ns-dashboard-header h2 {
    margin: 0 0 6px !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #fff !important;
}

.ns-dashboard-header p {
    margin: 0 0 2px !important;
    font-size: 14px;
    opacity: 0.85;
    color: var(--otp-white);
}

.ns-dashboard-header strong { color: #fff; }

.ns-last-synced {
    font-size: 12px !important;
    opacity: 0.6 !important;
    margin-top: 6px !important;
}

.ns-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.ns-btn {
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.ns-btn-logout {
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: 2px solid rgba(255,255,255,0.4);
}

.ns-btn-logout:hover { background: rgba(255,255,255,0.25); }

.ns-table-wrap {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 20px rgba(17,22,43,0.07);
    overflow: hidden;
}

.ns-pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--otp-border);
    gap: 12px;
    flex-wrap: wrap;
    background: #fff;
}

.ns-pagination-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--otp-muted);
}

.ns-items-dropdown {
    background: var(--otp-input-bg);
    border: 1px solid var(--otp-border);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 13px;
    color: #11162B;
    cursor: pointer;
}

/* Filter pushed to right */
.ns-filter-wrap {
    position: relative;
    margin-left: auto;
}

.ns-filter-btn {
    background: var(--otp-input-bg);
    border: 1px solid var(--otp-border);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    color: #11162B;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ns-filter-btn:hover {
    border-color: var(--otp-primary);
    color: var(--otp-primary);
}

.ns-filter-arrow { font-size: 10px; opacity: 0.6; }

/* Dropdown opens right-aligned */
.ns-filter-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    left: auto;
    background: #fff;
    border: 1px solid var(--otp-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(17,22,43,0.12);
    min-width: 220px;
    z-index: 999;
    overflow: hidden;
}

.ns-filter-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--otp-border);
    font-size: 13px;
    font-weight: 600;
    color: var(--otp-dark);
}

.ns-filter-link {
    background: none;
    border: none;
    color: var(--otp-primary);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    font-weight: 500;
}

.ns-filter-link:last-child {
    margin-left: 8px;
    color: var(--otp-muted);
}

.ns-filter-checkboxes {
    padding: 8px 0;
    max-height: 220px;
    overflow-y: auto;
}

.ns-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 13px;
}

.ns-filter-item:hover { background: var(--otp-input-bg); }

.ns-filter-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--otp-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.ns-filter-label { flex: 1; color: #11162B; }
.ns-filter-count { color: var(--otp-muted); font-size: 12px; }

.ns-pagination-summary {
    font-size: 13px;
    color: var(--otp-muted);
    white-space: nowrap;
}

.ns-invoice-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.ns-invoice-table thead { background: var(--otp-gradient); }

.ns-invoice-table thead th {
    color: #fff;
    padding: 14px 18px;
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.ns-invoice-table tbody tr {
    border-bottom: 1px solid #f0f4fb;
    transition: background 0.15s;
}

.ns-invoice-table tbody tr:hover { background: #f8faff; }
.ns-invoice-table tbody tr:last-child { border-bottom: none; }

.ns-invoice-table tbody td {
    padding: 14px 18px;
    font-size: 14px;
    color: #333;
    vertical-align: middle;
}

/* Status badges */
.ns-status {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.ns-status-fullyBilled            { background: #e8f8ef; color: #1a7a45; }
.ns-status-pendingBilling         { background: #fff8e1; color: #c47d0e; }
.ns-status-pendingFulfillment,
.ns-status-PendingFulfillment     { background: #eef3fb; color: #2D66B1; }
.ns-status-closed                 { background: #f0f0f0; color: #555; }
.ns-status-cancelled              { background: #fdf0f0; color: #c0392b; }
.ns-status-partiallyFulfilled     { background: #fff3e0; color: #e67e22; }
.ns-status-billed                 { background: #e8f8ef; color: #1a7a45; }
.ns-status-open                   { background: #e8f0fb; color: #2D66B1; }

.ns-track-link {
    color: var(--otp-primary);
    text-decoration: none;
    font-size: 13px;
    line-height: 1;
    display: inline-block;
}

.ns-track-link:hover { text-decoration: underline; }

.ns-tracking-soon {
    color: var(--otp-muted);
    font-size: 12px;
    font-style: italic;
}

.ns-tracking-wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }

.ns-tracking-toggle {
    background: none;
    border: none;
    color: var(--otp-primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

.ns-tracking-toggle:hover { text-decoration: underline; }

.ns-tracking-more { display: flex; flex-direction: column; gap: 3px; }

.ns-pagination-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 20px;
    flex-wrap: wrap;
    border-top: 1px solid #f0f4fb;
}

.ns-page-btn {
    background: var(--otp-input-bg);
    border: 1px solid var(--otp-border);
    color: #11162B;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.25;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 36px;
    text-align: center;
}

.ns-page-btn:hover:not(:disabled) {
    border-color: var(--otp-primary);
    color: var(--otp-primary);
    background: #e8f0fb;
}

.ns-page-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.ns-page-btn.ns-page-active {
    background: var(--otp-gradient);
    color: #fff !important;
    border-color: transparent;
}

.ns-page-dots { font-size: 13px; color: var(--otp-muted); padding: 0 4px; }

.ns-no-data { text-align: center; padding: 60px 20px; color: var(--otp-muted); font-size: 15px; }
.ns-not-logged-in { text-align: center; padding: 60px 20px; }
.ns-not-logged-in a { color: var(--otp-primary); font-weight: 600; }


/* ============================================================
   SYNC BUTTON & MESSAGE
   ============================================================ */
.ns-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ns-btn-sync {
    background: var(--otp-gradient) !important;
    color: #fff !important;
    border: 2px solid rgba(255,255,255,0.4);
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ns-btn-sync:hover:not(:disabled) {
  border-color: var(--otp-primary);
    color: var(--otp-primary) !important;
}

.ns-btn-sync:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.ns-sync-icon {
    font-size: 16px;
    display: inline-block;
    transition: transform 0.3s ease;
}

@keyframes ns-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.ns-spinning {
    animation: ns-spin 0.8s linear infinite;
    display: inline-block;
}

/* Sync message bar */
.ns-sync-message {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    display: none;
}

.ns-sync-success {
    background: #e8f8ef;
    color: #1a7a45;
    border-left: 4px solid #2ecc71;
}

.ns-sync-info {
    background: #e8f0fb;
    color: #1a3a6a;
    border-left: 4px solid #2D66B1;
}

/* Pagination */
.ns-pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    font-size: 13px;
    color: var(--otp-muted);
    flex-wrap: wrap;
    gap: 8px;
}

.ns-items-dropdown {
    background: var(--otp-input-bg);
    border: 1px solid var(--otp-border);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 13px;
    color: var(--otp-text);
    cursor: pointer;
    margin: 0 6px;
}

.ns-pagination-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 0 8px;
    flex-wrap: wrap;
}

.ns-page-btn {
    background: var(--otp-input-bg);
    border: 1px solid var(--otp-border);
    color: var(--otp-text);
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.25;
    cursor: pointer;
    transition: all 0.15s ease;
    min-width: 36px;
}

.ns-page-btn:hover:not(:disabled) {
    border-color: var(--otp-primary);
    color: var(--otp-primary);
}

.ns-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ns-page-btn.ns-page-active {
    background: var(--otp-gradient);
    color: #fff !important;
    border-color: transparent;
}

.ns-page-dots {
    font-size: 13px;
    color: var(--otp-muted);
    padding: 0 4px;
}

/* ============================================================
   STATUS FILTER DROPDOWN
   ============================================================ */
.ns-filter-wrap {
    position: relative;
}

.ns-filter-btn {
    background: var(--otp-input-bg);
    border: 1px solid var(--otp-border);
    border-radius: 8px;
    padding: 7px 14px;
    font-size: 13px;
    color: var(--otp-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ns-filter-btn:hover {
    border-color: var(--otp-primary);
    color: var(--otp-primary);
}

.ns-filter-arrow {
    font-size: 10px;
    opacity: 0.6;
}

.ns-filter-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #fff;
    border: 1px solid var(--otp-border);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(17,22,43,0.12);
    min-width: 220px;
    z-index: 999;
    overflow: hidden;
}

.ns-filter-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--otp-border);
    font-size: 13px;
    font-weight: 600;
    color: var(--otp-dark);
}

.ns-filter-link {
    background: none;
    border: none;
    color: var(--otp-primary);
    font-size: 12px;
    cursor: pointer;
    padding: 0;
    margin-left: auto;
    font-weight: 500;
}

.ns-filter-link:last-child {
    margin-left: 8px;
    color: var(--otp-muted);
}

.ns-filter-checkboxes {
    padding: 8px 0;
    max-height: 220px;
    overflow-y: auto;
}

.ns-filter-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-size: 13px;
}

.ns-filter-item:hover {
    background: var(--otp-input-bg);
}

.ns-filter-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--otp-primary);
    cursor: pointer;
    flex-shrink: 0;
}

.ns-filter-label {
    flex: 1;
    color: var(--otp-text);
}

.ns-filter-count {
    color: var(--otp-muted);
    font-size: 12px;
}

/* ============================================================
   OTP EXPIRY BAR & RESEND BUTTON
   ============================================================ */
.otp-expiry-wrap {
    margin-bottom: 14px;
}

.otp-expiry-track {
    height: 4px;
    background: var(--otp-border);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.otp-expiry-fill {
    height: 100%;
    width: 100%;
    background: var(--otp-gradient);
    border-radius: 4px;
    transition: width 1s linear, background 0.5s ease;
}

.otp-expiry-fill.otp-expiry-urgent {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

.otp-expiry-label {
    font-size: 11px;
    color: var(--otp-muted);
}

.otp-resend-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.otp-resend-btn {
    background: none;
    border: none;
    color: var(--otp-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s ease;
}

.otp-resend-btn:disabled {
    color: var(--otp-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.otp-resend-btn:not(:disabled):hover {
    text-decoration: underline;
}

.otp-link-btn {
    background: none;
    border: none;
    color: var(--otp-muted);
    font-size: 13px;
    cursor: pointer;
    padding: 0;
    transition: color 0.2s ease;
}

.otp-link-btn:hover {
    color: var(--otp-primary);
    text-decoration: underline;
}

/* ============================================================
   FLIP CARD LOGIN MODAL
   ============================================================ */
.otp-flip-wrap {
    width: 100%;
    max-width: 420px;
    perspective: 1400px;
    overflow: hidden;
    border-radius: 20px;
}

.otp-flip-card {
    position: relative;
    width: 100%;
    min-height: 400px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.otp-flip-card.is-flipped {
    transform: rotateY(180deg);
}

.otp-flip-face {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 40px 36px;
    box-shadow: var(--otp-shadow);
}

.otp-flip-front {
    background: #ffffff;
}

.otp-flip-back {
    background: #11162B;
    transform: rotateY(180deg);
}

.otp-close-dark {
    color: rgba(255, 255, 255, 0.6);
}

.otp-close-dark:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.otp-title-dark {
    color: #fff !important;
}

.otp-subtitle-dark {
    color: rgba(255, 255, 255, 0.55) !important;
}

.otp-subtitle-dark strong {
    color: #7fb0f0 !important;
}

.otp-label-dark {
    color: #7fb0f0 !important;
}

.otp-input-dark {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
    width: 100%;
    box-sizing: border-box;
    padding: 13px 16px !important;
}

.otp-input-dark::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.otp-input-dark:focus {
    border-color: #7fb0f0 !important;
    background: rgba(255, 255, 255, 0.12) !important;
    box-shadow: 0 0 0 3px rgba(127, 176, 240, 0.2) !important;
}

.otp-primary-btn-light {
    background: linear-gradient(135deg, #2D66B1, #5a8fd9);
}

.otp-flip-switch-wrap {
    text-align: center;
    margin-top: 4px;
}

.otp-flip-switch-btn {
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 600;
    color: var(--otp-primary);
    cursor: pointer;
    padding: 0;
}

.otp-flip-switch-btn:hover {
    text-decoration: underline;
}

.otp-flip-switch-btn-dark {
    background: none;
    border: none;
    font-size: 12px;
    font-weight: 600;
    color: #7fb0f0;
    cursor: pointer;
    padding: 0;
}

.otp-flip-switch-btn-dark:hover {
    text-decoration: underline;
}

.ns-support-text {
    text-align: center;
    font-size: 12px;
    color: var(--otp-muted);
    margin: 6px 0 0;
}

.ns-support-link-phone,.ns-support-link-email {
    color: var(--otp-primary);
    font-weight: 600;
    text-decoration: none;
}

.ns-support-link-phone:hover {
    text-decoration: underline;
    color: var(--otp-primary);
}

.ns-support-link-email:hover {
    text-decoration: underline;
    color: var(--otp-white);
}



.entry-header {
    margin: 40px 0 0;
}

.ns-invoice-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #d0dff0 #f8faff;
}

.ns-invoice-table-wrapper::-webkit-scrollbar {
    height: 5px;
}

.ns-invoice-table-wrapper::-webkit-scrollbar-track {
    background: #f8faff;
    border-radius: 4px;
}

.ns-invoice-table-wrapper::-webkit-scrollbar-thumb {
    background: #d0dff0;
    border-radius: 4px;
}

.ns-invoice-table-wrapper .ns-invoice-table {
    width: 100%;
    table-layout: fixed;
}
/* Column widths — targeted by class (not position), since the Type
   column is only present on some tabs and would otherwise shift every
   later column's width onto the wrong header. Percentages so the table
   always fills its container instead of forcing horizontal scroll. */
.ns-invoice-table thead th.col-tranid    { width: 11%; } /* Transaction ID */
.ns-invoice-table thead th.col-type      { width: 8%;  } /* Type */
.ns-invoice-table thead th.col-po        { width: 9%;  } /* PO Number */
.ns-invoice-table thead th.col-date      { width: 10%; } /* Transaction Date */
.ns-invoice-table thead th.col-amount    { width: 7%;  } /* Amount */
.ns-invoice-table thead th.col-status    { width: 10%; } /* Status */
.ns-invoice-table thead th.col-shipdate  { width: 8%;  } /* Ship Date */
.ns-invoice-table thead th.col-tracking  { width: 11%; } /* Tracking */
.ns-invoice-table thead th.col-pdf       { width: 26%; } /* PDF */

/* Center the PDF column — header label and cell content alike */
.ns-invoice-table thead th.col-pdf {
    text-align: center;
}
.ns-invoice-table tbody td.col-pdf {
    text-align: center;
}

/* Cell content */
.ns-invoice-table tbody td {
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    word-break: break-word;
}

/* Type column — no wrap */
.ns-invoice-table tbody td[data-label="Type"] {
    white-space: nowrap;
}

/* PDF column — always visible */
.ns-invoice-table tbody td[data-label="PDF"] {
    white-space: nowrap;
    overflow: visible;
}

/* Tracking numbers — stack vertically */
.ns-invoice-table-wrapper .ns-invoice-table .tracking-number-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* ============================================================
   TOOLTIP
   ============================================================ */
.ns-tooltip {
    position: relative;
    margin: 5px;
}

.ns-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #11162B;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 999;
}

.ns-tooltip::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #11162B;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 999;
}

.ns-tooltip:hover::after,
.ns-tooltip:hover::before {
    opacity: 1;
}
/* Search info icon */
.ns-search-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
}

#ns-table-search {
    flex: 1;
    min-width: 0;
    box-sizing: border-box;
}

.ns-search-info {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    min-width: 18px;
    background: #2D66B1;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
    transition: background 0.2s;
    font-style: normal;
    flex-shrink: 0;
}

.ns-search-info:hover {
    background: #11162B;
}

/* Tooltip shows below icon */
.ns-search-info.ns-tooltip::after {
    top: calc(100% + 8px);
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
}

.ns-search-info.ns-tooltip::before {
    top: calc(100% + 2px);
    bottom: auto;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: transparent;
    border-bottom-color: #11162B;
}

.ns-search-wrap {
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .ns-search-wrap {
        width: 100%;
    }
    .ns-search-inner {
        width: 100%;
    }
    #ns-table-search {
        width: 100% !important;
        min-width: 0 !important;
    }
}
/* Show when logged out */
.ns-customer-logged-out #mega-menu-item-147420 {
    display: none !important;
}
/* ============================================================
   UPDATE PHONE MODAL
   ============================================================ */
#ns-update-phone-input:focus {
    border-color: #2D66B1 !important;
    box-shadow: 0 0 0 3px rgba(45,102,177,0.15) !important;
    background: #fff !important;
}

#ns-phone-update-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45,102,177,0.55);
}

#ns-phone-update-submit:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

#ns-update-phone-btn:hover {
    background: rgba(255,255,255,0.25) !important;
    border-color: rgba(255,255,255,0.7) !important;
}
#ns-search-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #6b7a99;
    background: #fff;
    border-radius: 14px;
    margin-top: 12px;
    box-shadow: 0 2px 20px rgba(17,22,43,0.07);
}
/* Responsive */
@media (max-width: 900px) {
    .ns-dashboard { padding: 24px 16px; }
    .ns-dashboard-header { padding: 22px 24px; }
    .ns-customer-logged-out #mega-menu-item-147420 {
    display: none !important;
}
}

@media (max-width: 768px) {
    .ns-dashboard { padding: 16px 12px; }
    .ns-dashboard-header { flex-direction: column; align-items: flex-start; padding: 20px; }
    .ns-header-actions { width: 100%; justify-content: flex-end; }
    .ns-pagination-controls { flex-direction: column; align-items: flex-start; padding: 12px 16px; }
    .ns-filter-wrap { margin-left: 0; width: 100%; }
    .ns-filter-btn { width: 100%; justify-content: space-between; }

    /* Card layout on mobile */
    .ns-invoice-table thead { display: none; }
    .ns-invoice-table tbody tr {
        display: block;
        margin: 0 12px 12px;
        border: 1px solid var(--otp-border);
        border-radius: 12px;
        padding: 4px 0;
        box-shadow: 0 1px 6px rgba(17,22,43,0.06);
    }
    .ns-invoice-table tbody td {
        display: flex;
        gap: 15px;
        justify-content: space-between;
        align-items: center;
        padding: 10px 16px;
        border-bottom: 1px solid #f0f4fb;
        font-size: 13px;
    }
    .ns-invoice-table tbody td:last-child { border-bottom: none; }
    .ns-invoice-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 12px;
        color: var(--otp-muted);
        flex-shrink: 0;
    }

    .otp-modal { padding: 30px 20px; border-radius: 16px; }
    .otp-box { width: 40px !important; height: 48px !important; font-size: 19px !important; }
    .otp-boxes-wrap { gap: 6px; }

    .ns-invoice-table-wrapper {
        margin: 10px 0 0;
    }

    .ns-invoice-table-wrapper .ns-invoice-table {
        min-width: auto;
    }

    .ns-invoice-table-wrapper .ns-invoice-table .tracking-number-wrapper {
        justify-content: flex-end;
    }

    .ns-page-btn {
        padding: 8px;
    }

    .otp-user-greeting{
        display: none;
    }
    .ns-customer-logged-out #mega-menu-item-147420 {
    display: none !important;
}
}

@media (max-width: 480px) {
    .otp-flip-face {
        padding: 30px 22px;
    }
    .otp-flip-card {
        min-height: 350px;
    }
    .ns-page-btn:not(:first-child):not(:last-child) {
        display: none;
    }
    .ns-customer-logged-out #mega-menu-item-147420 {
    display: none !important;
}
}

@media (max-width: 400px) {
    .ns-dashboard { padding: 12px 8px; }
    .ns-dashboard-header { padding: 16px; }
    .ns-dashboard-header h2 { font-size: 18px !important; }
    .ns-customer-logged-out #mega-menu-item-147420 {
    display: none !important;
}
}


/* ============================================================
   TAB SYSTEM
   ============================================================ */
.ns-tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 2px solid #d0dff0;
    flex-wrap: wrap;
}

.ns-tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7a99;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
    border-radius: 8px 8px 0 0;
}

.ns-tab-btn:hover {
    color: #2D66B1;
    background: #eef3fb;
}

.ns-tab-btn.ns-tab-active {
    color: #2D66B1;
    border-bottom-color: #2D66B1;
    background: #eef3fb;
}

.ns-tab-count {
    background: #d0dff0;
    color: #2D66B1;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 50px;
}

.ns-tab-btn.ns-tab-active .ns-tab-count {
    background: #2D66B1;
    color: #fff;
}

/* Hide all panels — show only active */
.ns-tab-panel {
    display: none !important;
}

.ns-tab-panel.ns-tab-panel-active {
    display: block !important;
}

/* PDF buttons */
/* PDF buttons */
.ns-pdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none !important;
    margin-right: 4px;
    margin-bottom: 4px;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    min-width: 70px;
}

.ns-pdf-view {
    background: #eef3fb;
    color: #2D66B1 !important;
    border: 1px solid #d0dff0;
}

.ns-pdf-view:hover {
    background: #2D66B1;
    color: #fff !important;
}

.ns-pdf-download {
    background: #e8f8ef;
    color: #1a7a45 !important;
    border: 1px solid #b8e6cc;
}

.ns-pdf-download:hover {
    background: #1a7a45;
    color: #fff !important;
}

@media (max-width: 768px) {
    .ns-tab-bar { gap: 2px; }
    .ns-tab-btn { padding: 8px 12px; font-size: 13px; }

    /* On mobile — PDF buttons stack but full width */
    .ns-pdf-btn {
        display: block;
        width: 100%;
        text-align: center;
        margin-right: 0;
        margin-bottom: 6px;
        padding: 10px 12px;
        font-size: 13px;
        min-width: unset;
        box-sizing: border-box;
    }

    /* Type column wrapping allowed on mobile card layout */
    td[data-label="Type"] {
        white-space: normal;
    }
}


/* ============================================================
   VERIFIED BADGE
   ============================================================ */
.ns-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.3);
    color: #1a7a45;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 50px;
    margin-left: 6px;
    white-space: nowrap;
}

.ns-verified-icon {
    font-size: 10px;
}

/* ============================================================
   UPDATE EMAIL MODAL
   ============================================================ */
#ns-email-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 22, 43, 0.7);
    backdrop-filter: blur(6px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

#ns-email-modal {
    background: #fff;
    border-radius: 20px;
    padding: 40px 36px;
    width: 100%;
    max-width: 420px;
    position: relative;
    box-shadow: 0 20px 60px rgba(17,22,43,0.35);
    animation: slideUpModal 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

#ns-email-modal-close {
    position: absolute;
    top: 16px;
    right: 18px;
    background: none;
    border: none;
    font-size: 24px;
    color: var(--otp-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.2s;
}

#ns-email-modal-close:hover {
    background: var(--otp-input-bg);
    color: var(--otp-dark);
}

.ns-email-modal-header h3 {
    font-size: 22px !important;
    font-weight: 700 !important;
    color: var(--otp-dark) !important;
    text-align: center;
    margin: 0 0 8px !important;
}

.ns-email-modal-header p {
    font-size: 14px;
    color: var(--otp-muted);
    text-align: center;
    margin: 0 0 24px !important;
    line-height: 1.5;
}

.ns-email-field-group {
    margin-bottom: 20px;
}

.ns-email-field-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--otp-primary);
    margin-bottom: 8px;
}

#ns-update-email-input {
    width: 100%;
    background: var(--otp-input-bg) !important;
    border: 2px solid var(--otp-border) !important;
    border-radius: var(--otp-radius) !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    color: #11162B !important;
    outline: none !important;
    transition: all 0.2s !important;
    box-sizing: border-box;
}

#ns-update-email-input:focus {
    border-color: var(--otp-primary) !important;
    box-shadow: 0 0 0 3px rgba(45,102,177,0.15) !important;
    background: #fff !important;
}

#ns-email-send-link-btn,
#ns-email-modal-cancel {
    width: 100%;
    padding: 14px 24px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
}

#ns-email-send-link-btn {
    background: var(--otp-gradient);
    color: #fff !important;
    box-shadow: 0 4px 18px rgba(45,102,177,0.4);
    margin-bottom: 12px;
}

#ns-email-send-link-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(45,102,177,0.55);
}

#ns-email-send-link-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.ns-send-link-loader {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#ns-email-modal-cancel {
    background: transparent;
    color: var(--otp-muted) !important;
    border: 2px solid var(--otp-border);
}

#ns-email-modal-cancel:hover {
    border-color: var(--otp-primary);
    color: var(--otp-primary) !important;
}

#ns-email-modal-message {
    display: none;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 16px;
}

#ns-email-modal-message.success {
    background: #e8f8ef;
    color: #1a7a45;
    border-left: 3px solid var(--otp-success);
}

#ns-email-modal-message.error {
    background: #fdf0f0;
    color: #c0392b;
    border-left: 3px solid var(--otp-error);
}

#ns-email-step-2 {
    display: none;
}

#ns-email-step-2 .ns-email-modal-header p {
    font-size: 14px;
    color: var(--otp-muted);
    line-height: 1.6;
}

#ns-update-display-email {
    font-weight: 600;
    color: var(--otp-primary);
}

.ns-email-link-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

#ns-update-change-email {
    background: none;
    border: none;
    color: var(--otp-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-align: center;
}

#ns-update-change-email:hover {
    text-decoration: underline;
}

#ns-update-email-btn {
    background: rgba(255,255,255,0.15) !important;
    color: #fff !important;
    border: 2px solid rgba(255,255,255,0.4) !important;
    padding: 10px 20px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

#ns-update-email-btn:hover {
    background: rgba(255,255,255,0.25) !important;
    border-color: rgba(255,255,255,0.7) !important;
}

/* Update phone modal — ensure phone number input is full width */
#ns-update-phone-input {
    width: 100%;
    box-sizing: border-box;
}

.ns-update-otp-box {
    width: 46px !important;
    height: 54px !important;
    text-align: center !important;
    font-size: 22px !important;
    font-weight: 700 !important;
    color: #11162B !important;
    background: var(--otp-input-bg) !important;
    border: 2px solid var(--otp-border) !important;
    border-radius: 10px !important;
    outline: none !important;
    transition: all 0.15s !important;
    caret-color: transparent;
    padding: 0 !important;
}

.ns-update-otp-box:focus {
    border-color: var(--otp-primary) !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(45,102,177,0.15) !important;
    transform: scale(1.05);
}

#ns-update-otp-expiry-bar {
    height: 100%;
    width: 100%;
    background: var(--otp-gradient);
    border-radius: 4px;
    transition: width 1s linear, background 0.5s ease;
}

#ns-update-otp-expiry-bar.urgent {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

#ns-update-resend-btn {
    background: none;
    border: none;
    color: var(--otp-primary);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
}

#ns-update-resend-btn:disabled {
    color: var(--otp-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

#ns-update-resend-btn:not(:disabled):hover {
    text-decoration: underline;
}
