/* ============================================
   HEADING AI PLATFORM DEMO - STYLESHEET
   ============================================ */

/* Import Inter from Google Fonts as fallback */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Brand Colors - Indigo Palette */
    --b9: #2D3561;
    --b8: #3A4478;
    --b7: #4A5BA8;
    --b1: #E8EAF0;
    --b05: #F3F4F8;

    /* Status Colors */
    --g6: #16a34a;
    --g5: #22c55e;
    --g1: #dcfce7;
    --g05: #f0fdf4;
    --a6: #d97706;
    --a5: #f59e0b;
    --a2: #fde68a;
    --a1: #fef3c7;
    --a05: #fffbeb;
    --r6: #dc2626;
    --r5: #ef4444;
    --r2: #fecaca;
    --r1: #fee2e2;
    --r05: #fef2f2;
    --bl6: #2563eb;
    --bl5: #3b82f6;
    --bl2: #bfdbfe;
    --bl1: #dbeafe;
    --bl05: #eff6ff;
    --p6: #9333ea;
    --p1: #f3e8ff;

    /* Slate Scale */
    --s9: #0f172a;
    --s8: #1e293b;
    --s7: #334155;
    --s6: #475569;
    --s5: #64748b;
    --s4: #94a3b8;
    --s3: #cbd5e1;
    --s2: #e2e8f0;
    --s1: #f1f5f9;
    --s05: #f8fafc;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
    background: var(--s05);
    color: var(--s8);
    line-height: 1.5;
    overflow: hidden;
    height: 100vh;
}

/* ============================================
   LAYOUT
   ============================================ */
.app {
    display: flex;
    height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    width: 272px;
    min-width: 272px;
    background: #fff;
    border-right: 1px solid var(--s2);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.sidebar-logo {
    padding: 20px 22px 18px;
    border-bottom: 1px solid var(--s1);
}

.sidebar-logo img,
.sidebar-logo svg {
    height: 30px;
    width: auto;
    display: block;
}

.sidebar-status {
    padding: 14px 16px;
    border-bottom: 1px solid var(--s1);
}

.sc {
    background: var(--s05);
    border: 1px solid var(--s2);
    border-radius: 14px;
    padding: 14px;
}

.sc-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--s4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 10px;
}

.sc-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sc-circle {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--g05);
    border: 2.5px solid var(--g5);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.18);
}

.sc-circle span {
    font-size: 18px;
    font-weight: 800;
    color: var(--g6);
}

.sc-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--s8);
}

.sc-sub {
    font-size: 11px;
    color: var(--s5);
}

/* Sidebar Navigation */
.snav {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.snav-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--s4);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 12px;
    margin-bottom: 6px;
}

.nb {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px 13px;
    border: none;
    background: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: var(--s6);
    transition: all 0.15s;
    text-align: left;
}

.nb:hover {
    background: var(--s05);
    color: var(--s8);
}

.nb.active {
    background: var(--b05);
    color: var(--b9);
    font-weight: 600;
}

.nb svg {
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    opacity: 0.65;
}

.nb.active svg {
    opacity: 1;
}

.nb .nbg {
    margin-left: auto;
    background: var(--s2);
    color: var(--s6);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}

.nb.active .nbg {
    background: var(--b1);
    color: var(--b9);
}

/* Sidebar Footer */
.sfooter {
    padding: 14px;
    border-top: 1px solid var(--s2);
}

.ato-card {
    background: var(--s05);
    border: 1px solid var(--s2);
    border-radius: 10px;
    padding: 11px;
    display: flex;
    align-items: center;
    gap: 11px;
}

.ato-av {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--b9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.ato-nm {
    font-size: 13px;
    font-weight: 600;
    color: var(--s8);
}

.ato-ref {
    font-size: 11px;
    color: var(--s5);
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top Bar */
.topbar {
    height: 56px;
    background: #fff;
    border-bottom: 1px solid var(--s2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 22px;
    flex-shrink: 0;
}

.tb-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tb-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--s8);
}

.tb-badge {
    font-size: 11px;
    font-weight: 600;
    background: var(--g1);
    color: var(--g6);
    padding: 3px 10px;
    border-radius: 20px;
}

.tb-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Search */
.srch-wrap {
    position: relative;
}

.srch {
    width: 300px;
    padding: 7px 13px 7px 36px;
    border: 1px solid var(--s2);
    border-radius: 10px;
    font-size: 13px;
    font-family: inherit;
    background: var(--s05);
    color: var(--s7);
    outline: none;
    transition: border-color 0.15s;
}

.srch:focus {
    border-color: var(--b7);
    box-shadow: 0 0 0 3px rgba(74, 91, 168, 0.1);
}

.srch-ic {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: var(--s4);
}

/* Notification Button */
.nbtn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--s2);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: background 0.15s;
}

.nbtn:hover {
    background: var(--s05);
}

.ndot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--r5);
    border-radius: 50%;
    border: 2px solid #fff;
}

/* Content Area */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 22px;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

/* ============================================
   CARDS & COMPONENTS
   ============================================ */
.card {
    background: #fff;
    border: 1px solid var(--s2);
    border-radius: 14px;
    padding: 18px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.card-h:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
}

.card-c {
    cursor: pointer;
}

/* Grid Layouts */
.g2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.g3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.g4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

/* Margins */
.mb16 {
    margin-bottom: 16px;
}

.mb20 {
    margin-bottom: 20px;
}

.mb24 {
    margin-bottom: 24px;
}

/* Status Dots */
.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

.dot-g {
    background: var(--g5);
}

.dot-a {
    background: var(--a5);
}

.dot-r {
    background: var(--r5);
}

.dot-bl {
    background: var(--bl5);
}

.dot-pulse {
    animation: dp 2s infinite;
}

@keyframes dp {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Badges */
.bdg {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.bdg-g {
    background: var(--g1);
    color: var(--g6);
}

.bdg-a {
    background: var(--a1);
    color: var(--a6);
}

.bdg-r {
    background: var(--r1);
    color: var(--r6);
}

.bdg-bl {
    background: var(--bl1);
    color: var(--bl6);
}

.bdg-p {
    background: var(--p1);
    color: var(--p6);
}

.bdg-s {
    background: var(--s1);
    color: var(--s6);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
    white-space: nowrap;
}

.btn-p {
    background: var(--b9);
    color: #fff;
}

.btn-p:hover {
    background: var(--b8);
}

.btn-r {
    background: var(--r5);
    color: #fff;
}

.btn-r:hover {
    background: var(--r6);
}

.btn-a {
    background: var(--a2);
    color: #92400e;
}

.btn-a:hover {
    background: var(--a5);
    color: #fff;
}

.btn-gh {
    background: var(--s1);
    color: var(--s7);
}

.btn-gh:hover {
    background: var(--s2);
}

.btn-sm {
    padding: 5px 11px;
    font-size: 12px;
}

/* Filter Buttons */
.fb {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.fbtn {
    padding: 6px 13px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    color: var(--s6);
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.15s;
}

.fbtn:hover {
    background: var(--s1);
}

.fbtn.active {
    background: rgba(45, 53, 97, 0.08);
    color: var(--b9);
    font-weight: 600;
}

/* Section Headers */
.sh {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.st {
    font-size: 16px;
    font-weight: 700;
    color: var(--s8);
}

/* ============================================
   TABLE
   ============================================ */
.dt {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.dt th {
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    color: var(--s4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 14px;
    border-bottom: 1px solid var(--s2);
    background: var(--s05);
    position: sticky;
    top: 0;
    z-index: 1;
}

.dt td {
    padding: 10px 14px;
    font-size: 13px;
    border-bottom: 1px solid var(--s1);
    vertical-align: middle;
}

.dt tbody tr {
    cursor: pointer;
    transition: background 0.1s;
}

.dt tbody tr:hover {
    background: var(--s05);
}

.pc {
    display: flex;
    align-items: center;
    gap: 9px;
}

.pav {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}

.pnm {
    font-weight: 600;
    color: var(--s8);
    font-size: 13px;
}

/* ============================================
   FLEET CARDS
   ============================================ */
.fc {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fh {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.freg {
    font-size: 17px;
    font-weight: 800;
    color: var(--s8);
    letter-spacing: 0.02em;
}

.ftype {
    font-size: 12px;
    color: var(--s5);
    font-weight: 500;
}

.frows {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.frow {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.frl {
    color: var(--s5);
}

.frv {
    color: var(--s7);
    font-weight: 500;
}

/* ============================================
   DOCUMENT VAULT
   ============================================ */
.dr {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--s1);
    cursor: pointer;
    transition: background 0.1s;
}

.dr:hover {
    background: var(--s05);
}

.dr:last-child {
    border-bottom: none;
}

.dic {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.dnm {
    font-weight: 600;
    font-size: 13px;
    color: var(--s8);
}

.dmt {
    font-size: 11px;
    color: var(--s5);
}

/* ============================================
   TIMELINE
   ============================================ */
.tm {
    margin-bottom: 24px;
}

.tmh {
    font-size: 14px;
    font-weight: 700;
    color: var(--s7);
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 2px solid var(--s2);
}

.ti {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 3px;
    transition: background 0.1s;
}

.ti:hover {
    background: var(--s05);
}

.td {
    width: 55px;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
}

.tdot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.tinm {
    font-size: 13px;
    font-weight: 600;
    color: var(--s8);
}

.tidl {
    font-size: 12px;
    color: var(--s5);
}

.tidy {
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    text-align: right;
    width: 90px;
}

/* ============================================
   Q&A SECTION
   ============================================ */
.qia {
    background: #fff;
    border: 1px solid var(--s2);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 22px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.qi {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--s2);
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    background: var(--s05);
    color: var(--s8);
}

.qi:focus {
    border-color: var(--b7);
    box-shadow: 0 0 0 3px rgba(74, 91, 168, 0.1);
}

.qi::placeholder {
    color: var(--s4);
}

.qit {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qitem {
    background: #fff;
    border: 1px solid var(--s2);
    border-radius: 14px;
    overflow: hidden;
}

.qq {
    padding: 14px 18px;
    background: var(--b05);
    border-bottom: 1px solid var(--s2);
    font-weight: 600;
    font-size: 13.5px;
    color: var(--b9);
    display: flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
}

.qq:hover {
    background: var(--b1);
}

.qa {
    padding: 18px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--s7);
}

.qa p {
    margin-bottom: 10px;
}

.qa p:last-child {
    margin-bottom: 0;
}

.qsrc {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid var(--s1);
    font-size: 11px;
    color: var(--s5);
}

.qsrc strong {
    color: var(--s6);
}

.qcol {
    display: none;
}

.qitem.open .qcol {
    display: block;
}

.qchv {
    margin-left: auto;
    transition: transform 0.2s;
    width: 15px;
    height: 15px;
    color: var(--s4);
    flex-shrink: 0;
}

.qitem.open .qchv {
    transform: rotate(180deg);
}

/* ============================================
   UPLOAD ZONE
   ============================================ */
.uz {
    border: 2px dashed var(--s3);
    border-radius: 14px;
    padding: 44px 22px;
    text-align: center;
    background: var(--s05);
    cursor: pointer;
    transition: all 0.2s;
}

.uz:hover {
    border-color: var(--b7);
    background: var(--b05);
}

.uzic {
    width: 44px;
    height: 44px;
    color: var(--s4);
    margin: 0 auto 14px;
}

.uzt {
    font-size: 15px;
    font-weight: 600;
    color: var(--s7);
    margin-bottom: 3px;
}

.uzs {
    font-size: 13px;
    color: var(--s5);
}

.rui {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 10px 0;
    border-bottom: 1px solid var(--s1);
}

.rui:last-child {
    border-bottom: none;
}

.ufic {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.upbar {
    width: 100%;
    height: 4px;
    background: var(--s2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 5px;
}

.upfill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s;
}

/* ============================================
   MODAL
   ============================================ */
.mo {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.mo.open {
    display: flex;
}

.ml {
    background: #fff;
    border-radius: 18px;
    width: 660px;
    max-height: 82vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.mlh {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--s2);
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 1;
    border-radius: 18px 18px 0 0;
}

.mlt {
    font-size: 16px;
    font-weight: 700;
    color: var(--s8);
}

.mlc {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: var(--s1);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--s5);
    font-size: 18px;
    transition: background 0.15s;
}

.mlc:hover {
    background: var(--s2);
}

.mlb {
    padding: 22px;
}

.mls {
    margin-bottom: 22px;
}

.mls:last-child {
    margin-bottom: 0;
}

.mlsl {
    font-size: 12px;
    font-weight: 600;
    color: var(--s4);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.mf {
    display: flex;
    justify-content: space-between;
    padding: 7px 0;
    border-bottom: 1px solid var(--s1);
    font-size: 13px;
}

.mf:last-child {
    border-bottom: none;
}

.mfl {
    color: var(--s5);
}

.mfv {
    color: var(--s8);
    font-weight: 500;
}

.mdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 11px;
    background: var(--s05);
    border-radius: 8px;
    margin-bottom: 5px;
    font-size: 13px;
}

/* ============================================
   AI PROCESSING
   ============================================ */
.aip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--bl05);
    border: 1px solid var(--bl2);
    border-radius: 10px;
}

.ais {
    width: 17px;
    height: 17px;
    border: 2.5px solid var(--bl2);
    border-top-color: var(--bl5);
    border-radius: 50%;
    animation: sp 0.8s linear infinite;
    flex-shrink: 0;
}

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

.ait {
    font-size: 13px;
    color: var(--bl6);
    font-weight: 500;
}

/* ============================================
   NOTIFICATION DROPDOWN
   ============================================ */
.ndd {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 340px;
    background: #fff;
    border: 1px solid var(--s2);
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 50;
    max-height: 380px;
    overflow-y: auto;
}

.ndd.open {
    display: block;
}

.nddh {
    padding: 12px 16px;
    border-bottom: 1px solid var(--s2);
    font-size: 13px;
    font-weight: 700;
    color: var(--s8);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ndi {
    padding: 10px 16px;
    border-bottom: 1px solid var(--s1);
    display: flex;
    gap: 9px;
    cursor: pointer;
    transition: background 0.1s;
}

.ndi:hover {
    background: var(--s05);
}

.ndi:last-child {
    border-bottom: none;
}

.ndi-txt {
    font-size: 12.5px;
    color: var(--s7);
    line-height: 1.4;
}

.ndi-tm {
    font-size: 11px;
    color: var(--s4);
    margin-top: 2px;
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.flex {
    display: flex;
}

.aic {
    align-items: center;
}

.jcb {
    justify-content: space-between;
}

.gap8 {
    gap: 8px;
}

.flex1 {
    flex: 1;
    min-width: 0;
}

/* ============================================
   AI ANALYSIS PANEL
   ============================================ */
.ai-hdr {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
}

.ai-hdr-a {
    background: var(--a05);
    border: 1px solid var(--a2);
}

.ai-stat {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.comp-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 4px;
}

.comp-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
}

.comp-g {
    background: var(--g05);
    color: var(--s7);
}

.comp-g .comp-sc {
    color: var(--g6);
    font-weight: 700;
}

.comp-a {
    background: var(--a05);
    color: var(--s7);
}

.comp-a .comp-sc {
    color: var(--a6);
    font-weight: 700;
}

.ai-tone {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: var(--s05);
    border-radius: 10px;
    border: 1px solid var(--s2);
    font-size: 13px;
    color: var(--s7);
    line-height: 1.6;
}

.ai-tone-ic {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 18px;
}

.ai-action {
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid var(--bl2);
    background: var(--bl05);
    margin-bottom: 8px;
}

.ai-action-h {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--bl6);
    margin-bottom: 6px;
}

.ai-action-t {
    font-size: 12.5px;
    color: var(--s7);
    line-height: 1.6;
}

.ai-email {
    background: var(--s05);
    border: 1px solid var(--s2);
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 12.5px;
    color: var(--s7);
    line-height: 1.7;
}

.ai-email-subj {
    font-weight: 600;
    color: var(--s8);
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--s2);
    font-size: 13px;
}

.ai-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--bl6);
    background: var(--bl1);
    padding: 3px 8px;
    border-radius: 5px;
    margin-bottom: 10px;
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--s3);
    border-radius: 3px;
}

/* ============================================
   PASSWORD PROTECTION
   ============================================ */
.password-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--b7) 0%, var(--b9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.password-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.password-modal {
    background: #fff;
    border-radius: 16px;
    padding: 48px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.4s ease;
}

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

.password-modal svg {
    height: 48px;
    width: auto;
    display: block;
    margin: 0 auto 32px;
}

.password-modal h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--s8);
    text-align: center;
    margin-bottom: 12px;
}

.password-modal p {
    font-size: 0.9375rem;
    color: var(--s5);
    text-align: center;
    margin-bottom: 32px;
}

.password-input-group {
    margin-bottom: 24px;
}

.password-input {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--s2);
    border-radius: 10px;
    font-size: 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
    transition: all 0.2s ease;
}

.password-input:focus {
    outline: none;
    border-color: var(--b7);
    box-shadow: 0 0 0 3px rgba(74, 91, 168, 0.1);
}

.password-input.error {
    border-color: var(--r5);
}

.password-error {
    color: var(--r5);
    font-size: 0.875rem;
    margin-top: 12px;
    display: none;
}

.password-error.visible {
    display: block;
}

.password-submit {
    width: 100%;
    padding: 14px 24px;
    background: var(--b7);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.password-submit:hover {
    background: var(--b9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 53, 97, 0.3);
}

.password-submit:active {
    transform: translateY(0);
}

body.locked {
    overflow: hidden;
}

body.locked > *:not(.password-overlay) {
    filter: blur(8px);
    pointer-events: none;
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-8px);
    }
    20%, 40%, 60%, 80% {
        transform: translateX(8px);
    }
}
