/* ═══════════════════════════════════════════════════
   Leaves — Shared Design System
   Used by: employee/leaves, manager/leaves, create form
═══════════════════════════════════════════════════ */

:root {
    --purple: #d2aaf3;
    --purple-dark: #b47ee8;
    --purple-soft: rgba(210, 170, 243, .13);
    --purple-glow: rgba(210, 170, 243, .22);
    --bg: #f5f3fa;
    --bg-card: #ffffff;
    --text-main: #1e1535;
    --text-sub: #6b5f88;
    --text-muted: #a99fc0;
    --border: rgba(210, 170, 243, .28);
    --radius: 16px;
    --shadow: 0 4px 24px rgba(180, 126, 232, .10);
    --shadow-hover: 0 12px 36px rgba(180, 126, 232, .18);
}

/* ── Wrapper ── */
.lv-wrapper {
    min-height: 100vh;
    background: #fff;
    padding: 44px 0 80px;
    padding-top: 6rem;
    /* direction: rtl; */
    position: relative;
}

.lv-wrapper::before {
    content: '';
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 10% 10%, rgba(210, 170, 243, .15) 0%, transparent 38%),
        radial-gradient(circle at 90% 85%, rgba(210, 170, 243, .10) 0%, transparent 38%);
    pointer-events: none;
    z-index: 0;
}

.lv-wrapper > .container { position: relative; z-index: 1; }

/* ── Header ── */
.lv-header {
    display: flex;
    align-items: center;
    /* justify-content: space-between; */
    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}
.lv-header2 {
    display: flex;
    align-items: center;

    margin-bottom: 32px;
    flex-wrap: wrap;
    gap: 16px;
}

.lv-header-left { display: flex; flex-direction: column; gap: 4px; }

.lv-eyebrow {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--purple-dark);
    display: flex;
    align-items: center;
    gap: 7px;
}

.lv-eyebrow::before {
    content: '';
    display: inline-block;
    width: 18px;
    height: 2px;
    background: var(--purple-dark);
    border-radius: 2px;
      align-items: right;
}

.lv-title {  flex-direction: row-reverse;font-size: 1.7rem; font-weight: 800; color: var(--text-main); margin: 0; }

/* ── Back button ── */
.lv-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--purple-soft);
    color: var(--purple-dark);
    text-decoration: none;
    transition: background .2s;
    flex-shrink: 0;
}

.lv-back:hover { background: rgba(210, 170, 243, .25); }
.lv-back svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }

/* ── Primary button ── */
.lv-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    background: var(--base-color-brand--dark, #041530);
    color: #fff !important;
    border: none;
    border-radius: 10px;
    font-size: .88rem;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 4px 14px rgba(4, 21, 48, .35);
    transition: background .22s, transform .22s, box-shadow .22s;
}

.lv-btn:hover {
    background: var(--accent-dk, #011f6a);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(4, 21, 48, .45);
}

.lv-btn svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2.4; stroke-linecap: round; }

/* ── Tabs ── */
.lv-tabs-wrapper { margin-bottom: 24px; }

.lv-tabs {
    display: flex;
    gap: 6px;
    background: var(--purple-soft);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 5px;
    width: fit-content;
}

.lv-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 20px;
    border-radius: 9px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--text-sub);
    cursor: pointer;
    border: none;
    background: transparent;
    transition: all .22s ease;
    white-space: nowrap;
    text-decoration: none !important;
}

.lv-tab:hover { color: var(--purple-dark); background: rgba(210, 170, 243, .18); }

.lv-tab.active {
    background: #fff;
    color: var(--purple-dark);
    box-shadow: 0 2px 12px rgba(180, 126, 232, .15);
    font-weight: 700;
}

.lv-tab svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }

.lv-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 10px;
    font-size: .7rem;
    font-weight: 700;
    background: var(--purple-dark);
    color: #fff;
    line-height: 1;
}

.lv-tab:not(.active) .lv-tab-badge { background: rgba(180, 126, 232, .22); color: var(--purple-dark); }

.lv-tab-panel { display: none; animation: fadeUp .3s ease both; }
.lv-tab-panel.active { display: block; }

/* ── Animations ── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Card ── */
.lv-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.lv-card-head {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
    background: var(--purple-soft);
    display: flex;
    align-items: center;
    gap: 10px;
}

.lv-card-head-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
    background: rgba(210, 170, 243, .25);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.lv-card-head-icon svg { width: 15px; height: 15px; stroke: var(--purple-dark); fill: none; stroke-width: 2; stroke-linecap: round; }
.lv-card-title { font-size: .95rem; font-weight: 800; color: var(--text-main); margin: 0; }
.lv-card-body  { padding: 24px; }

/* ── Badges ── */
.lv-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 11px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}

.lv-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .7;
    flex-shrink: 0;
}

.lv-badge-warning { background: rgba(251, 191, 36, .12);  color: #b45309; }
.lv-badge-info    { background: rgba(59, 130, 246, .10);   color: #1d4ed8; }
.lv-badge-success { background: rgba(34, 197, 94, .11);    color: #15803d; }
.lv-badge-danger  { background: rgba(239, 68, 68, .10);    color: #b91c1c; }
.lv-badge-purple  { background: rgba(180, 126, 232, .14);  color: #7c3aed; }
.lv-badge-neutral { background: rgba(100, 100, 120, .10);  color: #6b7280; }

/* ── Action buttons ── */
.lv-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 600;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none !important;
    background: none;
}

.lv-action-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }

.lv-action-approve      { background: rgba(34, 197, 94, .10);   color: #15803d; border-color: rgba(34, 197, 94, .25); }
.lv-action-approve:hover  { background: rgba(34, 197, 94, .20);  border-color: rgba(34, 197, 94, .45);  color: #15803d; }

.lv-action-hr-approve     { background: rgba(180, 126, 232, .12); color: #7c3aed; border-color: rgba(180, 126, 232, .30); }
.lv-action-hr-approve:hover { background: rgba(180, 126, 232, .22); border-color: rgba(180, 126, 232, .50); color: #7c3aed; }

.lv-action-reject       { background: rgba(239, 68, 68, .09);   color: #b91c1c; border-color: rgba(239, 68, 68, .22); }
.lv-action-reject:hover   { background: rgba(239, 68, 68, .18);  border-color: rgba(239, 68, 68, .40);  color: #b91c1c; }

/* ── Attachment ── */
.lv-attach {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--purple-soft);
    color: var(--purple-dark) !important;
    font-size: .78rem;
    font-weight: 600;
    text-decoration: none !important;
    transition: background .2s, border-color .2s;
}

.lv-attach:hover { background: rgba(210, 170, 243, .25); border-color: var(--purple-dark); }
.lv-attach svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

/* ── Empty state ── */
.lv-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 64px 24px; gap: 12px; }

.lv-empty-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--purple-soft);
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.lv-empty-icon svg { width: 28px; height: 28px; stroke: var(--purple-dark); fill: none; stroke-width: 1.6; stroke-linecap: round; }
.lv-empty p { font-size: .9rem; color: var(--text-muted); margin: 0; font-weight: 500; }

/* ── Employee chip ── */
.lv-emp-chip { display: inline-flex; align-items: center; gap: 7px; }

.lv-emp-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--purple-soft);
    border: 1.5px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 700;
    color: var(--purple-dark);
    flex-shrink: 0;
}

.lv-emp-name { font-weight: 600; font-size: .85rem; color: var(--text-main); }

/* ── Comment chip ── */
.lv-comment-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
    color: var(--text-sub);
    cursor: default;
    max-width: 160px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Notes button ── */
.lv-notes-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--purple-soft);
    color: var(--purple-dark);
    font-size: .78rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, border-color .2s;
}

.lv-notes-btn:hover { background: rgba(210, 170, 243, .25); border-color: var(--purple-dark); }
.lv-notes-btn svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }

/* ── Modal ── */
.lv-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(30, 21, 53, .45);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.lv-modal-overlay.open { display: flex; }

.lv-modal-box {
    background: #fff;
    border-radius: 18px;
    padding: 28px 32px 32px;
    width: 100%;
    max-width: 460px;
    margin: 16px;
    box-shadow: 0 20px 60px rgba(180, 126, 232, .25);
    direction: rtl;
    animation: fadeUp .25s ease both;
}

.lv-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }

.lv-modal-header-left { display: flex; align-items: center; gap: 10px; }

.lv-modal-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--purple-soft);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.lv-modal-icon svg { width: 17px; height: 17px; stroke: var(--purple-dark); fill: none; stroke-width: 2; stroke-linecap: round; }

.lv-modal-title { margin: 0; font-weight: 800; color: var(--text-main); font-size: 1.1rem; }
.lv-modal-sub   { font-size: .75rem; color: var(--text-muted); margin: 0; }

.lv-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.4rem;
    line-height: 1;
    padding: 0;
    transition: color .2s;
}

.lv-modal-close:hover { color: var(--text-main); }

.lv-modal-label { display: block; margin-bottom: 8px; font-weight: 600; font-size: .85rem; color: var(--text-sub); }

.lv-modal-textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: .88rem;
    color: var(--text-main);
    resize: none;
    outline: none;
    font-family: inherit;
    transition: border-color .2s;
    background: #faf8ff;
    box-sizing: border-box;
}

.lv-modal-textarea:focus { border-color: var(--purple-dark); }

.lv-modal-footer { display: flex; gap: 10px; margin-top: 20px; justify-content: flex-end; }

.lv-modal-cancel {
    padding: 9px 20px;
    border-radius: 9px;
    border: 1.5px solid var(--border);
    background: #fff;
    color: var(--text-sub);
    font-weight: 600;
    font-size: .85rem;
    cursor: pointer;
}

.lv-modal-submit {
    padding: 9px 22px;
    border-radius: 9px;
    border: none;
    font-weight: 700;
    font-size: .85rem;
    cursor: pointer;
    color: #fff;
    box-shadow: 0 4px 14px rgba(180, 126, 232, .3);
    transition: opacity .2s;
}

/* ── Note cards inside modal ── */
.lv-note-card {
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
    border: 1px solid transparent;
}

.lv-note-card:last-child { margin-bottom: 0; }
.lv-note-card-manager    { background: rgba(251, 191, 36, .07);  border-color: rgba(251, 191, 36, .25); }
.lv-note-card-hr         { background: rgba(180, 126, 232, .07); border-color: rgba(180, 126, 232, .22); }

.lv-note-card-header { display: flex; align-items: center; gap: 7px; margin-bottom: 8px; }

.lv-note-dot         { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.lv-note-dot-manager { background: #b45309; }
.lv-note-dot-hr      { background: #7c3aed; }

.lv-note-from         { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.lv-note-from-manager { color: #b45309; }
.lv-note-from-hr      { color: #7c3aed; }
.lv-note-text         { font-size: .88rem; color: var(--text-main); line-height: 1.6; margin: 0; }

.lv-no-notes { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 24px 0 8px; color: var(--text-muted); font-size: .88rem; }
.lv-no-notes svg { width: 32px; height: 32px; stroke: var(--border); fill: none; stroke-width: 1.5; stroke-linecap: round; }

/* ── Form fields (create page) ── */
.lv-form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 640px) { .lv-form-grid { grid-template-columns: 1fr; } }

.lv-field { display: flex; flex-direction: column; gap: 6px; }
.lv-field.span-2 { grid-column: span 2; }

@media (max-width: 640px) { .lv-field.span-2 { grid-column: span 1; } }

.lv-label { font-size: .82rem; font-weight: 700; color: var(--text-sub); display: flex; align-items: center; gap: 5px; }
.lv-label .req { color: #dc2626; }

.lv-input,
.lv-select,
.lv-textarea {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    padding: 10px 14px;
    font-size: .88rem;
    color: var(--text-main);
    background: #faf8ff;
    outline: none;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}

.lv-input:focus,
.lv-select:focus,
.lv-textarea:focus {
    border-color: var(--purple-dark);
    box-shadow: 0 0 0 3px rgba(180, 126, 232, .12);
}

.lv-textarea { resize: vertical; min-height: 90px; }
.lv-select   { appearance: none; cursor: pointer; }

.lv-select-wrap { position: relative; }
.lv-select-wrap::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--text-muted);
    pointer-events: none;
}

/* ── Balance badge ── */
.lv-balance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .78rem;
    font-weight: 600;
    background: rgba(34, 197, 94, .10);
    border: 1px solid rgba(34, 197, 94, .22);
    color: #15803d;
    margin-top: 6px;
}

.lv-balance svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; }

/* ── File input ── */
.lv-file-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border: 1.5px dashed var(--border);
    border-radius: 10px;
    background: var(--purple-soft);
    cursor: pointer;
    font-size: .85rem;
    color: var(--text-sub);
    font-weight: 600;
    transition: border-color .2s, background .2s;
}

.lv-file-label:hover { border-color: var(--purple-dark); background: rgba(210, 170, 243, .2); }
.lv-file-label svg   { width: 16px; height: 16px; stroke: var(--purple-dark); fill: none; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }
.lv-file-label input { display: none; }

/* ── Acknowledgement ── */
.lv-ack {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    background: var(--purple-soft);
    cursor: pointer;
    transition: border-color .2s;
}

.lv-ack:has(input:checked) { border-color: var(--purple-dark); background: rgba(210, 170, 243, .18); }

.lv-ack input[type="checkbox"] {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-radius: 5px;
    cursor: pointer;
    accent-color: var(--purple-dark);
    flex-shrink: 0;
    margin-top: 2px;
}

.lv-ack-text { font-size: .85rem; color: var(--text-sub); line-height: 1.7; margin: 0; }

/* ── Submit button ── */
.lv-submit {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--base-color-brand--dark, #041530);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(4, 21, 48, .3);
    transition: background .22s, transform .22s, opacity .2s;
}

.lv-submit:hover:not(:disabled) { background: #011f6a; transform: translateY(-2px); }
.lv-submit:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.lv-submit svg { width: 16px; height: 16px; stroke: #fff; fill: none; stroke-width: 2.4; stroke-linecap: round; }

/* ── Alert ── */
.lv-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(134, 213, 152, .12);
    border: 1px solid rgba(134, 213, 152, .35);
    border-radius: 10px;
    padding: 12px 18px;
    margin-bottom: 24px;
    font-size: .88rem;
    font-weight: 500;
    color: #2e7d4f;
    animation: fadeUp .3s ease both;
}

.lv-alert svg { width: 18px; height: 18px; stroke: #2e7d4f; fill: none; stroke-width: 2; stroke-linecap: round; flex-shrink: 0; }