:root {
    --navy: #112a46;
    --blue: #2877d7;
    --blue-dark: #1b63ba;
    --ink: #17212b;
    --muted: #687787;
    --line: #dfe7ef;
    --soft: #f5f8fb;
    --mint: #dff6ed;
    --green: #137a57;
    --violet: #eee9ff
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    color: var(--ink);
    background: #f8fafc
}

.brand {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -.06em
}

.brand-light {
    color: #fff
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-right: .45rem;
    border-radius: 9px;
    color: #fff;
    font-size: 1rem;
    background: linear-gradient(135deg, #4e9af0, #2467bc)
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 44% 56%
}

.auth-aside {
    position: relative;
    overflow: hidden;
    padding: 3rem clamp(2rem, 6vw, 6rem);
    color: #eef7ff;
    background: var(--navy)
}

.auth-aside:after {
    content: '';
    position: absolute;
    width: 540px;
    height: 540px;
    bottom: -230px;
    right: -130px;
    border: 1px solid #81b6e835;
    border-radius: 50%;
    box-shadow: 0 0 0 65px #81b6e80d, 0 0 0 130px #81b6e80a
}

.aside-content {
    position: relative;
    z-index: 1;
    max-width: 480px;
    margin-top: clamp(5rem, 16vh, 11rem)
}

.eyebrow {
    font-size: .69rem;
    letter-spacing: .15em;
    font-weight: 700;
    text-transform: uppercase
}

.accent {
    color: var(--blue)
}

.auth-aside .eyebrow {
    color: #9dc9f5
}

.auth-aside h1,
.dashboard-header h1 {
    font-family: 'Playfair Display', serif;
    letter-spacing: -.045em
}

.auth-aside h1 {
    font-size: clamp(2.5rem, 4vw, 4.2rem);
    line-height: 1.08;
    margin: 1rem 0 1.3rem
}

.auth-aside p {
    color: #c3d6e9;
    line-height: 1.65
}

.trust-card {
    display: flex;
    gap: .8rem;
    align-items: center;
    margin-top: 3rem;
    padding: 1rem;
    border: 1px solid #ffffff1c;
    border-radius: 10px;
    background: #ffffff0a
}

.trust-card i {
    font-size: 1.35rem;
    color: #87c3ff
}

.trust-card strong,
.trust-card span {
    display: block
}

.trust-card span {
    margin-top: .15rem;
    color: #b8cde0;
    font-size: .83rem
}

.aside-footer {
    position: absolute;
    bottom: 1.5rem;
    font-size: .75rem
}

.auth-content {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: #fcfdff
}

.auth-card {
    width: min(100%, 440px)
}

.auth-view {
    display: none
}

.auth-view.active {
    display: block
}

.auth-form h2,
.auth-view h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    letter-spacing: -.035em;
    font-weight: 700
}

.muted {
    color: var(--muted)
}

.auth-tabs {
    padding: .3rem;
    border-radius: 10px;
    background: #f1f5f8
}

.auth-tabs .nav-item {
    width: 50%
}

.auth-tabs .nav-link {
    width: 100%;
    border-radius: 7px;
    color: var(--muted);
    font-weight: 600
}

.auth-tabs .nav-link.active {
    color: var(--blue);
    background: #fff;
    box-shadow: 0 1px 3px #1d39501c
}

.form-label {
    font-size: .87rem;
    font-weight: 700
}

.form-control,
.form-select {
    min-height: 46px;
    border-color: var(--line);
    border-radius: 8px
}

.form-control:focus,
.form-select:focus {
    border-color: #6ea7e5;
    box-shadow: 0 0 0 .2rem #2877d71c
}

.input-group .form-control {
    border-radius: 8px 0 0 8px
}

.password-toggle {
    border-color: var(--line);
    border-left: 0;
    border-radius: 0 8px 8px 0;
    color: var(--muted)
}

.password-toggle:hover {
    background: white;
    color: var(--blue);
    border-color: var(--line)
}

.field .invalid-feedback,
.field-error {
    display: none;
    color: #c23b3b;
    font-size: .8rem;
    margin-top: .35rem
}

.field.has-error .invalid-feedback,
.field-error.visible {
    display: block
}

.field.has-error .form-control,
.field.has-error .form-select {
    border-color: #df6d6d
}

.text-link {
    border: 0;
    background: transparent;
    padding: 0;
    color: var(--blue);
    font-weight: 700;
    font-size: .88rem
}

.text-link:hover {
    color: var(--blue-dark);
    text-decoration: underline
}

.btn-primary {
    background: var(--blue);
    border-color: var(--blue);
    font-weight: 700
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--blue-dark);
    border-color: var(--blue-dark)
}

button:disabled,
.btn:disabled {
    cursor: not-allowed;
    opacity: .65
}

.alert {
    border-radius: 10px;
    border-width: 1px;
    font-size: .9rem;
    line-height: 1.45
}

.btn-action {
    min-height: 47px;
    border-radius: 8px
}

.auth-footnote {
    margin-top: 1.1rem;
    color: var(--muted);
    text-align: center;
    font-size: .75rem
}

.demo-note {
    margin: 1.5rem 0;
    padding: .7rem .8rem;
    border-radius: 8px;
    background: #edf6ff;
    color: #32648d;
    font-size: .82rem
}

.otp-inputs {
    display: flex;
    gap: .45rem;
    justify-content: center
}

.otp-input {
    width: 47px;
    height: 54px;
    padding: 0;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700
}

.dashboard-app {
    min-height: 100vh;
    background: #f5f7fa
}

.sidebar {
    position: fixed;
    display: flex;
    flex-direction: column;
    width: 245px;
    min-height: 100vh;
    padding: 1.6rem 1rem;
    background: var(--navy)
}

.role-chip {
    width: max-content;
    margin: 2rem .65rem .5rem;
    padding: .28rem .55rem;
    border-radius: 20px;
    background: #ffffff18;
    color: #b9d8f5;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em
}

.sidebar-nav {
    margin-top: .8rem
}

.side-link {
    display: flex;
    gap: .7rem;
    align-items: center;
    margin: .25rem 0;
    padding: .75rem .8rem;
    border-radius: 8px;
    color: #a8bfd2;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 600
}

.side-link:hover,
.side-link.active {
    color: #fff;
    background: #ffffff12
}

.logout-button {
    margin-top: auto;
    border: 0;
    background: transparent;
    color: #a8bfd2;
    padding: .7rem .8rem;
    text-align: left;
    font-size: .9rem
}

.logout-button:hover {
    color: #fff
}

.main-content {
    margin-left: 245px;
    padding: 2.3rem clamp(1.5rem, 4vw, 4.5rem)
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem
}

.dashboard-header h1 {
    font-size: 2.25rem;
    margin: .35rem 0 0
}

.user-menu {
    display: flex;
    gap: .65rem;
    align-items: center
}

.user-menu strong,
.user-menu small {
    display: block
}

.user-menu small {
    color: var(--muted);
    font-size: .75rem;
    text-transform: capitalize
}

.user-initials,
.company-initials {
    display: grid;
    place-items: center;
    font-weight: 700
}

.user-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--blue);
    background: #eaf4ff
}

.stat-card,
.panel {
    height: 100%;
    padding: 1.35rem;
    border: 1px solid #e3eaf0;
    border-radius: 12px;
    background: #fff
}

.stat-card p {
    margin: 1rem 0 .2rem;
    color: var(--muted);
    font-size: .85rem
}

.stat-card strong {
    display: block;
    font-size: 1.65rem;
    letter-spacing: -.04em
}

.stat-card small {
    color: var(--muted);
    font-size: .77rem
}

.stat-icon {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px
}

.blue {
    color: var(--blue);
    background: #e9f4ff
}

.mint {
    color: var(--green);
    background: var(--mint)
}

.violet {
    color: #7054c8;
    background: var(--violet)
}

.success {
    color: var(--green) !important
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1.2rem
}

.panel h3 {
    margin: .25rem 0 0;
    font-size: 1.05rem;
    font-weight: 700
}

.company-summary {
    display: flex;
    align-items: center;
    gap: .8rem
}

.company-initials {
    width: 47px;
    height: 47px;
    border-radius: 11px;
    color: var(--green);
    background: var(--mint)
}

.company-summary strong {
    font-size: 1.05rem
}

.company-summary p {
    margin: .15rem 0;
    color: var(--muted);
    font-size: .83rem
}

.verified-badge {
    color: var(--green);
    font-size: .75rem;
    font-weight: 700
}

.table th {
    padding: .4rem .5rem .75rem;
    border-bottom-color: var(--line);
    color: var(--muted);
    font-size: .68rem;
    letter-spacing: .06em
}

.table td {
    padding: .9rem .5rem;
    border-bottom-color: #eef2f6
}

.table td strong,
.table td small {
    display: block
}

.table td small {
    color: var(--muted);
    font-size: .76rem
}

.role-badge {
    display: inline-block;
    padding: .23rem .45rem;
    border-radius: 5px;
    background: #f1f5f8;
    color: #4f6274;
    font-size: .72rem;
    font-weight: 700
}

.remove-button {
    border: 0;
    background: transparent;
    color: #c24646;
    font-size: .8rem
}

.company-list {
    display: grid;
    gap: .7rem
}

.company-row {
    display: flex;
    justify-content: space-between;
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: 8px
}

.modal-content {
    border: 0;
    border-radius: 12px
}

.modal-header,
.modal-footer {
    border-color: #edf1f4
}

.toast {
    background: #143d2e;
    color: #fff
}

.admin-only,
.owner-only,
.company-only {
    display: none
}

@media(max-width:850px) {
    .auth-layout {
        grid-template-columns: 1fr;
        min-height: 100vh;
    }

    .auth-aside {
        min-height: auto;
        padding: 1.5rem 1.25rem 1.25rem;
    }

    .auth-aside .brand {
        font-size: 1.2rem;
    }

    .aside-content {
        margin-top: 0.75rem;
        max-width: 100%;
    }

    .auth-aside h1 {
        font-size: clamp(1.4rem, 5vw, 1.85rem);
        margin: 0.35rem 0 0.5rem;
        line-height: 1.25;
    }

    .auth-aside p {
        font-size: 0.88rem;
        margin-bottom: 0;
        opacity: 0.9;
        line-height: 1.45;
    }

    .aside-footer,
    .trust-card {
        display: none;
    }

    .auth-content {
        padding: 1.5rem 1rem 2.5rem;
        align-items: flex-start;
    }

    .auth-card {
        width: 100%;
        max-width: 440px;
    }

    .auth-form h2,
    .auth-view h2 {
        font-size: clamp(1.45rem, 5.5vw, 1.85rem);
        margin-bottom: 0.35rem;
    }

    /* Mobile Sidebar Navigation */
    .sidebar {
        position: sticky;
        top: 0;
        z-index: 1020;
        width: 100%;
        min-height: auto;
        padding: 0.75rem 1rem 0.6rem;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    }

    .sidebar .brand {
        font-size: 1.15rem;
        display: inline-flex;
        align-items: center;
    }

    .role-chip {
        display: inline-flex;
        margin: 0 0 0 0.6rem;
        padding: 0.2rem 0.5rem;
        font-size: 0.65rem;
        vertical-align: middle;
    }

    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        gap: 0.35rem;
        margin-top: 0.65rem;
        padding-bottom: 0.35rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .sidebar-nav::-webkit-scrollbar {
        display: none;
    }

    .side-link {
        white-space: nowrap;
        flex-shrink: 0;
        margin: 0;
        padding: 0.5rem 0.8rem;
        font-size: 0.82rem;
        border-radius: 6px;
        min-height: 38px;
    }

    .logout-button {
        position: absolute;
        right: 1rem;
        top: 0.7rem;
        margin: 0;
        padding: 0.35rem 0.65rem;
        font-size: 0.8rem;
        border-radius: 6px;
        background: rgba(255, 255, 255, 0.12);
        color: #fff;
    }

    .logout-button:hover {
        background: rgba(255, 255, 255, 0.22);
    }

    /* Mobile Main Content & Headers */
    .main-content {
        margin-left: 0;
        padding: 1.15rem 0.85rem 2rem;
        width: 100%;
    }

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1.25rem;
    }

    .dashboard-header h1 {
        font-size: clamp(1.4rem, 5.5vw, 1.85rem);
        margin: 0.2rem 0 0;
    }

    .user-menu {
        display: none;
    }

    .dashboard-header > div:last-child {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .dashboard-header > div:last-child .btn {
        flex: 1 1 auto;
        min-height: 40px;
    }

    .panel-heading {
        flex-wrap: wrap;
        gap: 0.75rem;
        align-items: center;
    }

    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Mobile Forms & Inputs */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents auto-zoom on mobile browsers */
        min-height: 46px;
    }

    .input-group .form-control {
        min-height: 46px;
    }

    .password-toggle {
        min-width: 46px;
        min-height: 46px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Mobile Buttons */
    .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 600;
        touch-action: manipulation;
    }

    .btn-sm {
        min-height: 38px;
        padding: 0.35rem 0.75rem;
        font-size: 0.82rem;
    }

    .btn-action {
        min-height: 48px;
        font-size: 0.95rem;
    }

    /* Mobile Choice Cards */
    .choice-card {
        padding: 1rem;
        min-height: 60px;
    }

    /* Mobile Stat Cards */
    .stat-card {
        padding: 1.15rem;
    }

    .stat-card strong {
        font-size: 1.4rem;
    }

    /* Mobile Modals */
    .modal-dialog {
        margin: 0.6rem;
        max-width: calc(100% - 1.2rem);
    }

    .modal-content {
        border-radius: 12px;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }

    .modal-footer .btn {
        flex: 1 1 auto;
        min-height: 44px;
    }
}

@media(max-width:480px) {
    .auth-aside {
        padding: 1.2rem 1rem 1rem;
    }

    .auth-content {
        padding: 1.2rem 0.75rem 2rem;
    }

    .otp-inputs {
        gap: clamp(4px, 1.6vw, 8px);
        width: 100%;
        max-width: 100%;
    }

    .otp-input {
        width: clamp(34px, 11.5vw, 46px);
        height: clamp(42px, 13vw, 52px);
        font-size: clamp(1.05rem, 3.8vw, 1.35rem);
        border-radius: 6px;
        padding: 0;
    }

    .dashboard-header h1 {
        font-size: 1.5rem;
    }

    .auth-aside h1 {
        font-size: 1.45rem;
    }

    .main-content {
        padding: 0.85rem 0.65rem 1.5rem;
    }

    .panel {
        padding: 1.15rem 0.9rem;
    }

    .panel-heading h3 {
        font-size: 1rem;
    }

    /* Full width buttons in small mobile toolbars */
    .panel-heading > div:last-child {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .panel-heading > div:last-child .btn {
        flex: 1 1 calc(50% - 0.4rem);
        min-height: 38px;
    }
}

/* Table Extraction Steps */
.extraction-step {
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease;
  }
  
  .extraction-step.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
  }
  
  .extraction-step.active {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }
  
  /* Drop Zone Styling */
  .drop-zone {
    transition: all 0.3s ease;
  }
  
  .drop-zone:hover {
    background-color: #f0f0f0 !important;
  }
  
  /* Badge Styling */
  .badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
  }



.navbar {
    background-color: white;
    border-bottom: 1px solid #e0e0e0;
}

.navbar-brand {
    font-weight: 700;
    color: #006950 !important;
    font-size: 20px;
}

.container-main {
    padding: 30px 20px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #1a1a1a;
}

.page-header p {
    color: #666;
    margin: 0;
}

/* Table Cards */
.table-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.table-card:hover {
    border-color: #006950;
    box-shadow: 0 4px 12px rgba(0, 105, 80, 0.1);
    transform: translateY(-2px);
}

.table-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.table-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
}

.table-card-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #666;
    font-size: 14px;
}

.meta-item strong {
    color: #1a1a1a;
}

.table-card-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.table-card-actions button {
    flex: 1;
}

/* Table Details View */
.table-detail {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 20px;
}

.detail-title {
    font-size: 28px;
    font-weight: 700;
}

.detail-actions {
    display: flex;
    gap: 10px;
}

.table-responsive {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.table {
    margin-bottom: 0;
}

.table thead {
    background-color: #f8f9fa;
}

.table th {
    font-weight: 600;
    color: #1a1a1a;
    border-bottom: 2px solid #e0e0e0;
}

.table td {
    padding: 12px;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state-icon {
    font-size: 64px;
    color: #ccc;
    margin-bottom: 20px;
}

.empty-state-title {
    font-size: 24px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

.empty-state-text {
    color: #999;
    margin-bottom: 30px;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
}

.spinner-border {
    color: var(--blue);
}

/* ============================================
   PREMIUM TOAST & NOTIFICATION SYSTEM
   ============================================ */

.toast-portal-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 420px;
    width: calc(100vw - 48px);
    pointer-events: none;
}

.transivo-toast {
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 12px 32px -4px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(15, 23, 42, 0.06);
    border-left: 4px solid #2563eb;
    position: relative;
    overflow: hidden;
    transform: translateX(115%);
    opacity: 0;
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.32s ease;
}

.transivo-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.transivo-toast.hide {
    transform: translateX(115%);
    opacity: 0;
}

.transivo-toast-icon {
    font-size: 1.25rem;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 2px;
}

.transivo-toast-content {
    flex-grow: 1;
    min-width: 0;
}

.transivo-toast-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 2px;
    line-height: 1.2;
}

.transivo-toast-msg {
    font-size: 0.84rem;
    color: #475569;
    line-height: 1.45;
    word-break: break-word;
}

.transivo-toast-close {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding: 0;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    margin-left: 4px;
    transition: color 0.15s ease;
}

.transivo-toast-close:hover {
    color: #0f172a;
}

.transivo-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.35;
    width: 100%;
    transform-origin: left;
}

/* Toast variants */
.transivo-toast-success {
    border-left-color: #10b981;
}
.transivo-toast-success .transivo-toast-icon {
    color: #10b981;
}
.transivo-toast-success .transivo-toast-progress {
    color: #10b981;
}

.transivo-toast-danger,
.transivo-toast-error {
    border-left-color: #ef4444;
}
.transivo-toast-danger .transivo-toast-icon,
.transivo-toast-error .transivo-toast-icon {
    color: #ef4444;
}
.transivo-toast-danger .transivo-toast-progress,
.transivo-toast-error .transivo-toast-progress {
    color: #ef4444;
}

.transivo-toast-warning {
    border-left-color: #f59e0b;
}
.transivo-toast-warning .transivo-toast-icon {
    color: #f59e0b;
}
.transivo-toast-warning .transivo-toast-progress {
    color: #f59e0b;
}

.transivo-toast-info {
    border-left-color: #2563eb;
}
.transivo-toast-info .transivo-toast-icon {
    color: #2563eb;
}
.transivo-toast-info .transivo-toast-progress {
    color: #2563eb;
}

/* Modern Inline Alert enhancements */
.alert {
    border-radius: 12px;
    font-size: 0.88rem;
    padding: 0.9rem 1.15rem;
    border: 1px solid transparent;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.alert-danger {
    background-color: #fef2f2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-success {
    background-color: #f0fdf4;
    border-color: #bbf7d0;
    color: #166534;
}

.alert-warning {
    background-color: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.alert-info {
    background-color: #eff6ff;
    border-color: #bfdbfe;
    color: #1e40af;
}

.alert .btn-close {
    padding: 0.75rem;
    opacity: 0.6;
}

.alert .btn-close:hover {
    opacity: 1;
}

/* Glassmorphism & UI card polish */
.panel {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 6px 16px -4px rgba(0, 0, 0, 0.03);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 1.4rem;
    height: 100%;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.08);
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-right: .55rem;
    border-radius: 10px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6, #1d4ed8);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

/* Modern inputs & focus states */
.form-control:focus,
.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.btn {
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.15s ease;
}

.btn:active {
    transform: scale(0.98);
}

@media(max-width: 768px) {
    .toast-portal-container {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
    }
}

/* Table Mode Selection & Manual Table Styling */
.mode-option-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    border: 2px solid #e2e8f0 !important;
}

.mode-option-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.mode-option-card.active-mode {
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.12);
}

.mode-option-card.active-mode-manual {
    border-color: #10b981 !important;
    background: #f0fdf4 !important;
}

.mode-option-card.active-mode-extract {
    border-color: #2563eb !important;
    background: #eff6ff !important;
}

.column-badge-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    background: #ffffff;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.type-pill-number {
    background-color: #eff6ff;
    color: #1d4ed8;
    border: 1px solid #bfdbfe;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
}

.type-pill-letter {
    background-color: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
}

.type-pill-both {
    background-color: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    font-size: 11px;
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: 600;
}

.quick-col-btn {
    border-radius: 20px;
    font-size: 12px;
}

