* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ========================================
   LIGHT THEME
======================================== */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;

    --background: #f5f7fb;
    --surface: #ffffff;
    --surface-secondary: #f9fafb;
    --surface-hover: #f3f4f6;

    --text-primary: #111827;
    --text-secondary: #6b7280;

    --border: #e5e7eb;

    --sidebar-background: #111827;
    --sidebar-text: #d1d5db;
    --sidebar-text-secondary: #9ca3af;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-hover: rgba(255, 255, 255, 0.08);

    --icon-background: #eff6ff;

    --success: #16a34a;
    --success-background: #dcfce7;

    --danger: #ef4444;
    --danger-background: rgba(239, 68, 68, 0.12);

    --overlay: rgba(17, 24, 39, 0.55);

    --shadow: 0 4px 15px rgba(17, 24, 39, 0.05);

    --sidebar-width: 260px;
    --header-height: 72px;
    --radius: 12px;
    --summary-bg: #f8fafc;
    --bg-light: #f1f5f9;
    --strength-track:#d6dce5;
    color-scheme: light;
}


/* ========================================
   DARK THEME
======================================== */

[data-theme="dark"] {
    --primary: #3b82f6;
    --primary-hover: #60a5fa;

    --background: #0f172a;
    --surface: #111827;
    --surface-secondary: #182235;
    --surface-hover: #1f2937;

    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;

    --border: #293548;

    --sidebar-background: #0b1120;
    --sidebar-text: #d1d5db;
    --sidebar-text-secondary: #9ca3af;
    --sidebar-border: rgba(255, 255, 255, 0.08);
    --sidebar-hover: rgba(255, 255, 255, 0.08);

    --icon-background: rgba(59, 130, 246, 0.12);

    --success: #4ade80;
    --success-background: rgba(34, 197, 94, 0.15);

    --danger: #f87171;
    --danger-background: rgba(239, 68, 68, 0.15);

    --overlay: rgba(0, 0, 0, 0.7);

    --shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    --summary-bg: #1e293b;
     --bg-light: #1e293b;
    color-scheme: dark;
    --strength-track:#3b4658;
}

body {
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--background);
    color: var(--text-primary);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

/* Layout */

.app-layout {
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;

    width: var(--sidebar-width);

    display: flex;
    flex-direction: column;

    background: var(--sidebar-background);
    color: #ffffff;

    z-index: 1000;
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 22px;
    border-bottom: 1px solid var(--sidebar-border);/*rgba(255, 255, 255, 0.08);  */
}

.settings-toggle {
  width: 100%;
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.settings-arrow {
  margin-left: auto;
  font-size: 12px;
  transition: transform 0.25s ease;
}

.settings-arrow.rotate {
  transform: rotate(180deg);
}

.settings-submenu {
  display: none;
  flex-direction: column;
  margin: 4px 0 4px 20px;
  /* padding-left: 14px;
  border-left: 1px solid var(--border-color, #e5e7eb); */
}

.settings-submenu.open {
  display: flex;
}

.submenu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  /* color: var(--text-secondary, #6b7280); */
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  transition:
    background 0.2s ease,
    color 0.2s ease;
}

.submenu-item:hover,
.submenu-item.active {
    background: var(--sidebar-hover);
    color: #ffffff;
}

.submenu-item i {
  width: 18px;
  text-align: center;
  font-size: 13px;
}
.brand-icon {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: var(--primary);
    border-radius: 10px;
}
/* Brand Text */

.brand-text {
    display: flex;
    flex-direction: column;
    justify-content: center;

    min-width: 0;
}

.brand-text h2 {
    margin: 0;

    color: #ffffff;

    font-size: 17px;
    font-weight: 700;
    line-height: 1.25;

    letter-spacing: -0.2px;
}

.brand-text span {
    display: block;

    margin-top: 3px;

    color: #9ca3af;

    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
}

.sidebar-nav {
    flex: 1;

    padding: 20px 12px;

    overflow-y: auto;
}
.nav-item {
    display: flex;
    align-items: center;

    gap: 14px;

    padding: 12px 14px;
    margin-bottom: 5px;

    border-radius: 8px;

    color: var(--sidebar-text);

    transition: 0.2s;
}

.nav-item i {
    width: 20px;
    text-align: center;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: #ffffff;
}

.nav-item.active {
    background: var(--primary);
    color: #ffffff;
}

.nav-section-title {
    padding: 22px 14px 8px;

    font-size: 11px;
    font-weight: 600;

    color: #6b7280;

    letter-spacing: 1px;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 16px;

    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-user {
    display: flex;
    align-items: center;

    gap: 10px;
}

.user-avatar {
    width: 38px;
    height: 38px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background: var(--primary);

    color: #ffffff;
    font-weight: 600;
}

.user-avatar.small {
    width: 36px;
    height: 36px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-details strong {
    max-width: 120px;

    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;

    font-size: 13px;
}

.user-details span {
    margin-top: 2px;

    font-size: 11px;
    color: #9ca3af;

    text-transform: capitalize;
}

.logout-button {
    padding: 8px;

    color: #9ca3af;

    transition: 0.2s;
}

.logout-button:hover {
    color: #ffffff;
}

/* Main */

.main-wrapper {
    min-height: 100vh;
    margin-left: var(--sidebar-width);
}

/* Header */
.header-left h1 {
    font-size: 20px;
}

.header-left p {
    margin-top: 3px;

    font-size: 13px;
    color: var(--text-secondary);
}

.menu-button {
    display: none;

    border: 0;
    background: transparent;

    font-size: 20px;
    cursor: pointer;
}

.header-icon-button {
    width: 38px;
    height: 38px;

    border: 1px solid var(--border);
    border-radius: 50%;

    background: #ffffff;

    cursor: pointer;
}


/* Main Content */

.main-content {
    /* padding: 30px; */
     padding: calc(var(--header-height) + 28px) 28px 28px;
}

/* Cards */

.content-card {
    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 20px 22px;

    border-bottom: 1px solid var(--border);
}

.card-header h2 {
    font-size: 17px;
}

.card-header p {
    margin-top: 4px;

    font-size: 13px;
    color: var(--text-secondary);
}

.view-all-button {
    display: flex;
    align-items: center;

    gap: 8px;

    color: var(--primary);

    font-size: 13px;
    font-weight: 600;
}

/* Table */

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;

    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 15px 22px;

    text-align: left;

    border-bottom: 1px solid var(--border);
}

.data-table th {
    background: var(--surface-secondary);

    color: var(--text-secondary);

    font-size: 12px;
    font-weight: 600;

    text-transform: uppercase;
}

.data-table td {
    font-size: 14px;
    color: var(--text-primary);
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background:var(--surface-secondary); /* #f9fafb; */
}

.amount {
    font-weight: 600;
}

/* Responsive */

.sidebar-overlay {
    display: none;
}

/* ========================================
   Sidebar Profile
======================================== */

.sidebar-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 4px;

    padding: 14px 16px;

    border-top: 1px solid var(--sidebar-border);
}

.sidebar-profile-info {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 10px;
}

.sidebar-profile .user-avatar {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: var(--primary);

    color: #ffffff;

    font-size: 14px;
    font-weight: 600;
}

.sidebar-profile .user-details {
    min-width: 0;

    display: flex;
    flex-direction: column;
}

.sidebar-profile .user-details strong {
    max-width: 130px;

    overflow: hidden;

    color: #ffffff;

    font-size: 13px;
    font-weight: 600;

    white-space: nowrap;
    text-overflow: ellipsis;
}

.sidebar-profile .user-details span {
    margin-top: 2px;

    color: #9ca3af;

    font-size: 11px;

    text-transform: capitalize;
}
.sidebar-profile-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}
/* ========================================
   Developer Credit
======================================== */

.sidebar-credit {
    padding: 10px 16px 14px;

    text-align: center;

    /* border-top: 1px solid rgba(255, 255, 255, 0.06); */
}

.sidebar-credit span {
    display: block;

    margin-bottom: 3px;

    color: #6b7280;

    font-size: 10px;
}

.sidebar-credit strong {
    display: block;
    color: #7ea0ff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}
.sidebar-credit strong:hover{
    text-decoration: underline;
}

/* ========================================
   Logout Button
======================================== */

.theme-toggle-button, .logout-button {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    padding: 0;

    border: 0;
    border-radius: 8px;

    background: transparent;

    color: #9ca3af;

    font-size: 14px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.logout-button:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
}

.theme-toggle-button:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

/* ========================================
   Header Menu Button
======================================== */

.header-menu-button {
    display: none;

    width: 38px;
    height: 38px;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    padding: 0;

    border: 0;
    border-radius: 8px;

    background: transparent;

    color: var(--text-primary);

    font-size: 19px;

    cursor: pointer;

    transition: background 0.2s;
}

.header-menu-button:hover {
    background: var(--background);
}


/* ========================================
   Header
======================================== */

.top-header {
    position: fixed;

    top: 0;
    left: var(--sidebar-width);
    right: 0;

    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    border-color: var(--border);
    z-index: 900;
}

.header-left {
    min-width: 0;

    display: flex;
    align-items: center;

    gap: 16px;
}

.header-page-info {
    min-width: 0;
}

.header-page-info h1 {
    margin: 0;

    color: var(--text-primary);

    font-size: 20px;
    font-weight: 700;
}

.header-page-info p {
    margin-top: 3px;

    color: var(--text-secondary);

    font-size: 13px;
}

.header-right {
    display: flex;
    align-items: center;

    gap: 18px;
}


/* ========================================
   Header Notification
======================================== */

.header-action-button {
    position: relative;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    padding: 0;

    border: 1px solid var(--border);
    border-radius: 50%;

    background: var(--surface);

    color: var(--text-primary);

    font-size: 15px;

    cursor: pointer;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;
}

.header-action-button:hover {
    background: var(--surface-hover);
}

.notification-dot {
    position: absolute;

    top: 6px;
    right: 6px;

    width: 7px;
    height: 7px;

    border: 2px solid var(--surface);
    border-radius: 50%;

    background: #ef4444;
}
.notification-dot.hidden {
    display: none;
}


/* ========================================
   Header User
======================================== */

.header-user {
    display: flex;
    align-items: center;

    gap: 10px;
}

.header-avatar {
    width: 36px;
    height: 36px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 50%;

    background: var(--primary);

    color: #ffffff;

    font-size: 16px;
    font-weight: 600;
}

.header-user-info {
    display: flex;
    flex-direction: column;
}

.header-user-info strong {
    color: var(--text-primary);

    font-size: 13px;
    font-weight: 600;
}

.header-user-info span {
    margin-top: 2px;

    color: var(--text-secondary);

    font-size: 11px;

    text-transform: capitalize;
}

.header-right{
    position:relative;
}


/* ===========================
   Notification Dropdown
=========================== */

.notification-wrapper {
    position: relative;
}

.notification-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;

    width: 400px;
    max-height: 520px;

    background: var(--surface);

    border: 1px solid var(--border);
    border-radius: 18px;

    box-shadow:0 12px 32px rgba(15, 23, 42, .15);

    display: none;
    flex-direction: column;

    overflow: hidden;

    z-index: 99999;
}

.notification-dropdown.show {
    display: flex;
}

.notification-dropdown-header {
    padding: 18px 22px;

    border-bottom: 1px solid var(--border);

    background: var(--surface);
}

.notification-dropdown-header h3 {
    margin: 0;

    font-size: 20px;
    font-weight: 700;

    color: var(--text-primary);
}

.notification-list {
    overflow-y: auto;
    max-height: 440px;
}

.notification-list::-webkit-scrollbar {
    width: 8px;
}

.notification-list::-webkit-scrollbar-thumb {
    background: var(--sidebar-text);
    border-radius: 100px;
}

.notification-list::-webkit-scrollbar-track {
    background: transparent;
}

/* ===========================
   Notification Item
=========================== */

.notification-item {

    display: flex;
    gap: 14px;

    padding: 16px 20px;

    border-bottom: 1px solid #f1f5f9;

    cursor: pointer;

    transition: .25s;
     position: relative;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item:hover {
    background: var(--summary-bg);
}

.notification-unread .notification-title {
    font-weight: 700;
}

.notification-unread::after {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);

    position: absolute;
    top: 20px;
    right: 16px;
}

.notification-unread {
    background: rgba(37, 99, 235, 0.08);
    border-left: 4px solid var(--primary);
}

.notification-unread:hover {
    background: rgba(37, 99, 235, 0.14);
}

/* Dark theme */
[data-theme="dark"] .notification-unread {
    background: rgba(59,130,246,.16);
}

[data-theme="dark"] .notification-unread:hover {
    background: rgba(59,130,246,.22);
}

/* icon */

.notification-icon {

    width: 42px;
    height: 42px;

    border-radius: 50%;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    font-size: 18px;

    background: #e8f0ff;
    color: var(--primary);
}

/* content */

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.notification-message {

    margin-top: 5px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.45;
}

.notification-time {
    margin-top: 8px;
    font-size: 12px;
    color: #9ca3af;
}

/* Empty */

.notification-empty {
    padding: 70px 20px;
    text-align: center;
    color: #94a3b8;
}

.notification-empty i {
    font-size: 42px;
    margin-bottom: 12px;
    display: block;
}




@media (max-width: 900px) {

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0;
    }

    .menu-button {
        display: block;
    }

    .sidebar-overlay.active {
        display: block;

        position: fixed;
        inset: 0;

        background: rgba(0, 0, 0, 0.45);

        z-index: 999;
    }
    .top-header {
        left: 0;
    }

    .main-content {
        padding-top: calc(var(--header-height) + 20px);
    }
    .header-menu-button {
        display: flex;
    }

}

@media (max-width: 600px) {

    .top-header {
        padding: 0 16px;
        left: 0;
    }

    .main-content {
        padding-top: calc(var(--header-height) + 20px);
        /* padding: 16px; */
    }

    .header-user-info {
        display: none;
    }
    .header-page-info h1 {
        font-size: 17px;
    }
    .header-page-info p {
        display: none;
    }
    .header-right {
        gap: 10px;
    }
    .header-left p {
        display: none;
    }
    .modal-overlay {
        padding: 10px;
    }
    .modal {
        max-height: calc(100vh - 20px);
    }

    .notification-dropdown {
        position: fixed;

        top: calc(var(--header-height) + 8px);
        left: 12px;
        right: 12px;

        width: auto;
        max-width: none;

        max-height: calc(100vh - var(--header-height) - 20px);

        border-radius: 14px;
    }

    .notification-dropdown-header {
        padding: 16px 18px;
    }

    .notification-dropdown-header h3 {
        font-size: 18px;
    }

    .notification-item {
        padding: 14px 16px;
    }

    .notification-title {
        font-size: 14px;
    }

    .notification-message {
        font-size: 13px;
    }

    .notification-time {
        font-size: 11px;
    }
}


/* =====================================
         PIN Modal 
=========================================*/

.pin-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.pin-modal.show {
  display: flex;
}

body.pin-modal-open {
    overflow: hidden;
    /* touch-action: none; Mobile */
}

.pin-modal .modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  z-index: 0; 
}

.pin-modal .modal-content {
  position: relative;
  z-index: 2;

  max-width: 600px;
  min-width: 350px;
  /* max-width: 100%; */
  max-height: calc(100vh - 32px);

  padding: 24px;
  overflow-x: hidden;
  overflow-y: auto;

  border: 1px solid var(--border);
  border-radius: 14px;

  background: var(--surface);
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
  animation: manageUserModalOpen 0.2s ease;
}
#messageModalText {
    white-space: pre-line;
}

@keyframes manageUserModalOpen {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pin-modal .small-modal {
  width: 450px;
}

.pin-modal .modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 3px solid var(--border);
  margin-bottom: 24px;
  padding: 0;
}

.pin-modal .modal-header > div:first-child {
  min-width: 0;
}

.pin-modal .modal-header h2 {
  margin: 0 0 5px;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 700;
}

.pin-modal .modal-header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.pin-modal .form-group {
  margin-bottom: 18px;
}

.pin-modal .form-group label {
  display: block;

  margin-bottom: 7px;

  color: #374151;

  font-size: 13px;
  font-weight: 600;
}

.pin-header-icon {
  width: 55px;
  margin-bottom: 10px;
  height: 55px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #fff;
  font-size: 22px;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.25);
}

/* ─── Helper Text with Reset PIN ─── */
.pin-modal .helper-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 8px;
}

.pin-modal .helper-text span {
  color: #6b7280;
  font-size: 13px;
  line-height: 1.4;
}

/* Reset PIN link button */
.reset-pin-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s ease;
}

.reset-pin-link i {
  font-size: 11px;
  transition: transform 0.3s ease;
}

.reset-pin-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.reset-pin-link:hover i {
  transform: rotate(180deg);
  text-decoration: none;
}

.reset-pin-link:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ─── PIN Input Wrapper ─── */
.pin-modal .password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.pin-modal .password-input-wrapper .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 16px;
  pointer-events: none;
  z-index: 1;
}

.pin-modal .password-input-wrapper input {
  width: 100%;
  height: 52px;
  padding: 0 48px 0 44px;
  border-radius: 12px;
  border: 2px solid #dbe4f3;
  outline: none;
  background: var(--surface);
  color: var(--text-primary);
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  font-family: inherit;
  transition: border-color 0.25s, box-shadow 0.25s;
  -webkit-appearance: none;
  appearance: none;
}
.pin-modal .password-input-wrapper #pin, #createPinForm input{
  letter-spacing: 14px;
}

.pin-modal .password-input-wrapper input::placeholder {
  color: #cbd5e1;
  font-weight: 400;
  letter-spacing: 4px;
}

.pin-modal .password-input-wrapper input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.pin-modal .password-input-wrapper input.error {
  border-color: #dc2626;
  box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.1);
}

/* ─── Password Toggle Button ─── */
.pin-modal .password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 15px;
  transition: background 0.2s, color 0.2s;
}

.pin-modal .password-toggle:hover {
  background: #eef4ff;
  color: var(--primary);
}

.pin-modal .password-toggle:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.3);
  outline-offset: 2px;
}

.pin-modal #pinMessage {
  min-height: 22px;
  text-align: center;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
}

.pin-modal #pinMessage.success {
  color: #16a34a;
}

.pin-modal #pinMessage.error {
  color: #dc2626;
}

.pin-modal .modal-footer {
  display: flex;
  align-items: center;
  /* justify-content: flex-end; */
  gap: 10px;
  justify-content: space-between;
  margin-top: 8px;
  /* padding-top: 20px; */
  padding: 20px 0 0 0;;
  border-top: 1px solid var(--border);
}


/* Secondary button (Login Again) */
.pin-modal .secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #ffffff;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pin-modal .secondary-btn:hover {
  background: #f9fafb;
  border-color: var(--sidebar-text);;
  color: #374151;
}

.pin-modal .secondary-btn:active {
  transform: scale(0.98);
}

.pin-modal .secondary-btn:focus-visible {
  outline: 2px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}

.pin-modal .secondary-btn i {
  font-size: 13px;
}

/* Primary button (Unlock) */
.pin-modal .primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #3b82f6);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.pin-modal .primary-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #2563eb);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

.pin-modal .primary-btn:active {
  transform: scale(0.98);
}

.pin-modal .primary-btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: 2px;
}

.pin-modal .primary-btn:disabled {
  background: #94a3b8;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  opacity: 0.7;
}

.pin-modal .primary-btn .spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

.pin-modal .primary-btn i {
  font-size: 14px;
}

/* ==========================================================
   OTP INPUTS
========================================================== */

.pin-modal .otp-container {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 28px 0 20px;
}

.pin-modal .otp-input {
  width: 52px !important;
  height: 56px !important;
  padding: 0 !important;

  border: 2px solid #dbe4f3;
  border-radius: 12px;

  background: #ffffff;

  color: var(--text-primary);

  text-align: center;

  font-size: 22px;
  font-weight: 700;

  outline: none;

  transition: all 0.25s ease;
}

.pin-modal .otp-input:hover {
  border-color: #93c5fd;
}

.pin-modal .otp-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.pin-modal .otp-input.filled {
  border-color: var(--primary);
  background: #eff6ff;
}

/* ==========================================================
   OTP FOOTER
========================================================== */

.pin-modal .otp-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;

  margin-top: 18px;
  margin-bottom: 16px;
}

.pin-modal #pinOtpCountdown {
  color: #6b7280;
  font-size: 13px;
  font-weight: 500;
}

/* ==========================================================
   RESEND BUTTON
========================================================== */

.pin-modal .link-btn {
  border: none;
  background: transparent;

  color: var(--primary);

  cursor: pointer;

  font-size: 13px;
  font-weight: 600;

  font-family: inherit;

  padding: 4px 0;

  transition: color 0.2s ease;
}

.pin-modal .link-btn:hover:not(:disabled) {
  color: #1d4ed8;
  text-decoration: underline;
}

.pin-modal .link-btn:disabled {
  color: #9ca3af;
  cursor: not-allowed;
  text-decoration: none;
}

/* ==========================================================
   RESPONSIVE
========================================================== */

@media (max-width: 480px) {

  .pin-modal .otp-container {
    gap: 8px;
  }

  .pin-modal .otp-input {
    width: 42px !important;
    height: 46px !important;
    font-size: 18px;
  }

  .pin-modal.otp-footer {
    flex-direction: column;
    gap: 10px;
    align-items: center;
  }
  .createpin-modal {
    padding: 22px 18px;
    border-radius: 14px;
  }

  .createpin-modal .modal-header {
    gap: 12px;
    margin-bottom: 20px;
  }

  .createpin-modal .modal-header h2 {
    font-size: 18px;
  }

  .createpin-modal .modal-header p {
    font-size: 13px;
  }

  .pin-header-icon {
    width: 46px;
    height: 46px;
    font-size: 18px;
  }

  .password-input-wrapper input {
    height: 48px;
    font-size: 20px;
    letter-spacing: 10px;
    padding: 0 44px 0 40px;
  }

  .password-input-wrapper .input-icon {
    font-size: 14px;
    left: 12px;
  }

  .password-toggle {
    width: 32px;
    height: 32px;
    font-size: 13px;
  }

  .helper-text {
    flex-direction: row;
    /* align-items: flex-start; */
    gap: 8px;
  }

  .helper-text span,
  .reset-pin-link {
    font-size: 15px;
  }

  .createpin-modal .modal-footer {
    flex-direction: column-reverse;
    gap: 10px;
  }

  .secondary-btn,
  .primary-btn {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }

  #pinMessage {
    font-size: 13px;
  }
}


/* ========== POPUP / TOAST NOTIFICATION ========== */

.popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.popup-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.popup-box {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px;
  width: 90%;
  max-width: 380px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.85) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-overlay.active .popup-box {
  transform: scale(1) translateY(0);
}

.popup-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  font-size: 28px;
}

.popup-icon.success {
  background: #dcfce7;
  color: #16a34a;
}

.popup-icon.error {
  background: #fee2e2;
  color: #ef4444;
}

.popup-icon.info {
  background: #dbeafe;
  color: var(--primary);
}

.popup-box h3 {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  margin-bottom: 10px;
}

.popup-box p {
  font-size: 14px;
  color: #666;
  line-height: 1.6;
  margin-bottom: 24px;
}

.popup-btn {
  width: 100%;
  height: 44px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: 0.2s;
}

.popup-btn.primary {
  background: linear-gradient(135deg, #0783ff, #066df0);
  color: #fff;
}

.popup-btn.primary:hover {
  box-shadow: 0 8px 20px rgba(8, 120, 249, 0.25);
}

.popup-btn.danger {
  background: #ef4444;
  color: #fff;
}

.popup-btn.danger:hover {
  background: #dc2626;
}
