/* بوابة الموظف — تصميم موحّد للصفحات */

.ep-portal {
    --ep-emerald: #059669;
    --ep-emerald-soft: #d1fae5;
    --ep-amber: #d97706;
    --ep-amber-soft: #fef3c7;
    --ep-rose: #e11d48;
    --ep-rose-soft: #ffe4e6;
    --ep-slate: #475569;
    --ep-card: #ffffff;
    --ep-border: rgba(15, 23, 42, 0.08);
    --ep-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.dark .ep-portal {
    --ep-card: rgb(24 24 27);
    --ep-border: rgba(255, 255, 255, 0.08);
    --ep-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.ep-portal__hero {
    position: relative;
    overflow: hidden;
    border-radius: 1.25rem;
    padding: 1.5rem 1.75rem;
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.22), transparent 42%),
        linear-gradient(135deg, #f59e0b 0%, #d97706 45%, #059669 100%);
    color: #fff;
    box-shadow: var(--ep-shadow);
}

.ep-portal__hero::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    inset-inline-end: -70px;
    inset-block-end: -90px;
    background: rgba(255, 255, 255, 0.12);
    filter: blur(2px);
}

.ep-portal__hero-top {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.ep-portal__greeting {
    font-size: 0.85rem;
    opacity: 0.92;
    margin-bottom: 0.35rem;
}

.ep-portal__name {
    font-size: clamp(1.35rem, 2.5vw, 1.85rem);
    font-weight: 800;
    line-height: 1.3;
}

.ep-portal__date-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.9rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(8px);
    font-size: 0.82rem;
    font-weight: 700;
}

.ep-portal__status-pill {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    padding: 0.45rem 0.85rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.82rem;
    font-weight: 700;
}

.ep-portal__status-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
}

.ep-portal__status-pill[data-tone="active"] .ep-portal__status-dot,
.ep-portal__status-pill[data-tone="present"] .ep-portal__status-dot {
    animation: ep-pulse 1.8s ease-in-out infinite;
}

.ep-portal__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

@media (max-width: 1024px) {
    .ep-portal__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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

.ep-portal__stat {
    background: var(--ep-card);
    border: 1px solid var(--ep-border);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.ep-portal__stat-label {
    font-size: 0.78rem;
    color: var(--ep-slate);
    margin-bottom: 0.35rem;
}

.ep-portal__stat-value {
    font-size: 1.35rem;
    font-weight: 800;
    color: rgb(15 23 42);
}

.dark .ep-portal__stat-value {
    color: rgb(244 244 245);
}

.ep-portal__stat-value--muted {
    font-size: 1rem;
    font-weight: 700;
    color: var(--ep-slate);
}

.ep-portal__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 1rem;
    margin-top: 1rem;
}

@media (max-width: 1024px) {
    .ep-portal__layout {
        grid-template-columns: 1fr;
    }
}

.ep-portal__panel {
    background: var(--ep-card);
    border: 1px solid var(--ep-border);
    border-radius: 1.15rem;
    padding: 1.25rem;
    box-shadow: var(--ep-shadow);
}

.ep-portal__panel-title {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 0.35rem;
}

.ep-portal__panel-sub {
    font-size: 0.82rem;
    color: var(--ep-slate);
    margin-bottom: 1.1rem;
}

.ep-portal__clock {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 0 1.25rem;
}

.ep-portal__clock-ring {
    position: relative;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at center, var(--ep-card) 58%, transparent 59%),
        conic-gradient(from 180deg, #f59e0b, #059669, #f59e0b);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35), 0 12px 30px rgba(217, 119, 6, 0.18);
}

.ep-portal__clock-ring[data-tone="active"] {
    animation: ep-ring-spin 12s linear infinite;
}

.ep-portal__clock-inner {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    background: var(--ep-card);
    border: 1px solid var(--ep-border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
}

.ep-portal__clock-time {
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    font-variant-numeric: tabular-nums;
}

.ep-portal__clock-caption {
    font-size: 0.75rem;
    color: var(--ep-slate);
}

.ep-portal__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

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

.ep-portal__action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    min-height: 3.25rem;
    border: 0;
    border-radius: 0.95rem;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.ep-portal__action:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.ep-portal__action:not(:disabled):hover {
    transform: translateY(-2px);
}

.ep-portal__action--in {
    color: #fff;
    background: linear-gradient(135deg, #34d399, #059669);
    box-shadow: 0 10px 24px rgba(5, 150, 105, 0.28);
}

.ep-portal__action--out {
    color: #fff;
    background: linear-gradient(135deg, #fb7185, #e11d48);
    box-shadow: 0 10px 24px rgba(225, 29, 72, 0.24);
}

.ep-portal__action svg {
    width: 1.15rem;
    height: 1.15rem;
    flex-shrink: 0;
}

.ep-portal__locating {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-top: 0.85rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.85rem;
    background: var(--ep-amber-soft);
    color: #92400e;
    font-size: 0.82rem;
    font-weight: 700;
}

.dark .ep-portal__locating {
    background: rgba(217, 119, 6, 0.15);
    color: #fbbf24;
}

.ep-portal__locating-dot {
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    background: currentColor;
    animation: ep-pulse 1.2s ease-in-out infinite;
}

.ep-portal__alert {
    margin-top: 0.85rem;
    padding: 0.8rem 0.95rem;
    border-radius: 0.85rem;
    border: 1px solid #fecaca;
    background: var(--ep-rose-soft);
    color: #9f1239;
    font-size: 0.82rem;
    line-height: 1.6;
}

.dark .ep-portal__alert {
    background: rgba(225, 29, 72, 0.12);
    border-color: rgba(251, 113, 133, 0.35);
    color: #fda4af;
}

.ep-portal__manual {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--ep-border);
}

.ep-portal__manual-label {
    font-size: 0.78rem;
    color: var(--ep-slate);
    margin-bottom: 0.65rem;
}

.ep-portal__manual-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ep-portal__tips {
    display: grid;
    gap: 0.75rem;
}

.ep-portal__tip {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.85rem 0.95rem;
    border-radius: 0.95rem;
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.15);
}

.dark .ep-portal__tip {
    background: rgba(245, 158, 11, 0.08);
}

.ep-portal__tip-icon {
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.75rem;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    color: #fff;
    background: linear-gradient(135deg, #fbbf24, #d97706);
}

.ep-portal__tip-icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.ep-portal__tip-title {
    font-size: 0.86rem;
    font-weight: 800;
    margin-bottom: 0.15rem;
}

.ep-portal__tip-text {
    font-size: 0.78rem;
    color: var(--ep-slate);
    line-height: 1.65;
}

.ep-portal__history {
    margin-top: 1rem;
}

.ep-portal__history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.ep-portal__history-title {
    font-size: 1rem;
    font-weight: 800;
}

.ep-portal__history-count {
    font-size: 0.75rem;
    color: var(--ep-slate);
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    background: rgba(148, 163, 184, 0.14);
}

.ep-portal__table-wrap {
    overflow-x: auto;
    border: 1px solid var(--ep-border);
    border-radius: 1rem;
}

.ep-portal__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.ep-portal__table th {
    padding: 0.8rem 0.95rem;
    text-align: start;
    font-weight: 800;
    color: var(--ep-slate);
    background: rgba(148, 163, 184, 0.08);
    white-space: nowrap;
}

.ep-portal__table td {
    padding: 0.85rem 0.95rem;
    border-top: 1px solid var(--ep-border);
    vertical-align: middle;
}

.ep-portal__table tbody tr {
    transition: background-color 0.15s ease;
}

.ep-portal__table tbody tr:hover {
    background: rgba(245, 158, 11, 0.05);
}

.ep-portal__badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 800;
    white-space: nowrap;
}

.ep-portal__badge[data-tone="present"],
.ep-portal__badge[data-tone="active"] {
    background: var(--ep-emerald-soft);
    color: #047857;
}

.ep-portal__badge[data-tone="late"] {
    background: var(--ep-amber-soft);
    color: #b45309;
}

.ep-portal__badge[data-tone="absent"] {
    background: var(--ep-rose-soft);
    color: #be123c;
}

.ep-portal__badge[data-tone="remote"] {
    background: #dbeafe;
    color: #1d4ed8;
}

.ep-portal__badge[data-tone="leave"] {
    background: #ede9fe;
    color: #6d28d9;
}

.ep-portal__badge[data-tone="done"],
.ep-portal__badge[data-tone="neutral"] {
    background: rgba(148, 163, 184, 0.16);
    color: var(--ep-slate);
}

.ep-portal__empty {
    padding: 2rem 1rem;
    text-align: center;
    color: var(--ep-slate);
    font-size: 0.85rem;
}

@keyframes ep-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: 0.65; }
}

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

/* ——— لوحة البوابة الرئيسية ——— */

.ep-portal__hero--dashboard {
    background:
        radial-gradient(circle at 0% 0%, rgba(255, 255, 255, 0.2), transparent 45%),
        linear-gradient(135deg, #f59e0b 0%, #ea580c 38%, #0d9488 100%);
}

.ep-portal__hero-meta {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
}

.ep-portal__meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 0.75rem;
    font-weight: 700;
}

.ep-portal__quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

@media (max-width: 900px) {
    .ep-portal__quick-grid {
        grid-template-columns: 1fr;
    }
}

.ep-portal__quick-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    padding: 1.15rem;
    border-radius: 1.1rem;
    border: 1px solid var(--ep-border);
    background: var(--ep-card);
    box-shadow: var(--ep-shadow);
    text-decoration: none;
    color: inherit;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.ep-portal__quick-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 36px rgba(15, 23, 42, 0.12);
    border-color: rgba(245, 158, 11, 0.35);
}

.ep-portal__quick-icon {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.85rem;
    display: grid;
    place-items: center;
    color: #fff;
}

.ep-portal__quick-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.ep-portal__quick-icon--attendance { background: linear-gradient(135deg, #34d399, #059669); }
.ep-portal__quick-icon--leave { background: linear-gradient(135deg, #fbbf24, #d97706); }
.ep-portal__quick-icon--payslip { background: linear-gradient(135deg, #38bdf8, #0284c7); }

.ep-portal__quick-title {
    font-size: 1rem;
    font-weight: 800;
}

.ep-portal__quick-text {
    font-size: 0.78rem;
    color: var(--ep-slate);
    line-height: 1.6;
}

.ep-portal__quick-arrow {
    margin-top: auto;
    font-size: 0.75rem;
    font-weight: 800;
    color: #d97706;
}

.ep-portal__snapshot {
    margin-top: 1rem;
}

.ep-portal__snapshot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

@media (max-width: 768px) {
    .ep-portal__snapshot-grid {
        grid-template-columns: 1fr;
    }
}

.ep-portal__snapshot-item {
    padding: 0.95rem 1rem;
    border-radius: 0.95rem;
    border: 1px solid var(--ep-border);
    background: rgba(148, 163, 184, 0.06);
}

.ep-portal__snapshot-label {
    font-size: 0.75rem;
    color: var(--ep-slate);
    margin-bottom: 0.25rem;
}

.ep-portal__snapshot-value {
    font-size: 1rem;
    font-weight: 800;
}

/* ——— كشوف الراتب ——— */

.ep-portal__hero--payslip {
    background:
        radial-gradient(circle at 100% 0%, rgba(255, 255, 255, 0.18), transparent 40%),
        linear-gradient(135deg, #0284c7 0%, #0d9488 55%, #059669 100%);
}

.ep-portal__hero-amount {
    position: relative;
    z-index: 1;
    margin-top: 0.75rem;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
}

.ep-portal__hero-amount span {
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    opacity: 0.88;
    margin-bottom: 0.15rem;
}

.ep-portal__payslip-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.ep-portal__payslip-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.15rem;
    border-radius: 1.1rem;
    border: 1px solid var(--ep-border);
    background: var(--ep-card);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ep-portal__payslip-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--ep-shadow);
}

.ep-portal__payslip-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.ep-portal__payslip-period {
    font-size: 1rem;
    font-weight: 800;
}

.ep-portal__payslip-year {
    font-size: 0.75rem;
    color: var(--ep-slate);
    margin-top: 0.15rem;
}

.ep-portal__payslip-net {
    font-size: 1.35rem;
    font-weight: 800;
    color: #047857;
}

.dark .ep-portal__payslip-net {
    color: #34d399;
}

.ep-portal__payslip-breakdown {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.ep-portal__payslip-line {
    padding: 0.55rem 0.6rem;
    border-radius: 0.7rem;
    background: rgba(148, 163, 184, 0.08);
    text-align: center;
}

.ep-portal__payslip-line-label {
    display: block;
    font-size: 0.68rem;
    color: var(--ep-slate);
    margin-bottom: 0.15rem;
}

.ep-portal__payslip-line-value {
    font-size: 0.78rem;
    font-weight: 800;
}

.ep-portal__payslip-download {
    margin-top: auto;
}

.ep-portal__grid--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 900px) {
    .ep-portal__grid--3 {
        grid-template-columns: 1fr;
    }
}

/* Tabs */
.ep-portal__tabs {
    display: flex;
    gap: 0.35rem;
    padding: 0.25rem;
    margin-bottom: 1rem;
    border-radius: 0.85rem;
    background: rgba(148, 163, 184, 0.1);
}

.ep-portal__tab {
    flex: 1;
    padding: 0.55rem 0.75rem;
    border: none;
    border-radius: 0.65rem;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--ep-slate);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}

.ep-portal__tab--active {
    background: var(--ep-card);
    color: #b45309;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.dark .ep-portal__tab--active {
    color: #fbbf24;
}

/* QR scanner */
.ep-portal__qr-section {
    margin-top: 0.5rem;
}

.ep-portal__qr-camera {
    position: relative;
    width: min(320px, 100%);
    aspect-ratio: 1;
    margin: 0.75rem auto;
    border-radius: 1rem;
    overflow: hidden;
    border: 2px solid rgba(180, 83, 9, 0.35);
    background: #0f172a;
}

.ep-portal__qr-camera video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ep-portal__qr-overlay {
    position: absolute;
    inset: 18%;
    border: 2px dashed rgba(251, 191, 36, 0.8);
    border-radius: 0.75rem;
    pointer-events: none;
}

.ep-portal__qr-hint,
.ep-portal__qr-mode {
    text-align: center;
    font-size: 0.82rem;
    color: var(--ep-slate);
    margin-top: 0.5rem;
}

/* Employee ID badge card */
.ep-portal__badge-section {
    text-align: center;
    margin-top: 0.5rem;
}

.ep-portal__badge-wrap {
    display: flex;
    justify-content: center;
    margin: 1rem 0 0.75rem;
}

.ep-portal__badge-actions {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.ep-portal__badge-tip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    color: var(--ep-slate);
    margin: 0;
    padding: 0.55rem 0.85rem;
    border-radius: 0.65rem;
    background: rgba(180, 83, 9, 0.06);
}

.ep-id-card {
    position: relative;
    width: min(340px, 100%);
    border-radius: 1.15rem;
    overflow: hidden;
    background: linear-gradient(165deg, #ffffff 0%, #fffbeb 100%);
    border: 1px solid rgba(180, 83, 9, 0.22);
    box-shadow:
        0 4px 6px rgba(15, 23, 42, 0.04),
        0 18px 40px rgba(180, 83, 9, 0.12);
    text-align: right;
}

.dark .ep-id-card {
    background: linear-gradient(165deg, #1c1917 0%, #292524 100%);
    border-color: rgba(251, 191, 36, 0.2);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.ep-id-card__stripe {
    height: 5px;
    background: linear-gradient(90deg, #b45309, #f59e0b, #d97706);
}

.ep-id-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.1rem 0.65rem;
}

.ep-id-card__brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    min-width: 0;
}

.ep-id-card__logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 0.5rem;
    background: #fff;
    padding: 3px;
    border: 1px solid rgba(180, 83, 9, 0.15);
}

.ep-id-card__logo-fallback {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    color: #b45309;
    border: 1px solid rgba(180, 83, 9, 0.2);
}

.ep-id-card__company {
    font-size: 0.82rem;
    font-weight: 800;
    color: #92400e;
    margin: 0;
    line-height: 1.3;
}

.dark .ep-id-card__company {
    color: #fbbf24;
}

.ep-id-card__type {
    font-size: 0.65rem;
    color: #78716c;
    margin: 0.1rem 0 0;
    letter-spacing: 0.02em;
}

.ep-id-card__chip {
    color: #d97706;
    opacity: 0.85;
    flex-shrink: 0;
}

.ep-id-card__body {
    padding: 0.35rem 1.1rem 0.85rem;
}

.ep-id-card__profile {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.ep-id-card__avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 3px solid #fff;
    box-shadow: 0 4px 14px rgba(180, 83, 9, 0.2);
}

.ep-id-card__avatar--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(145deg, #d97706, #b45309);
}

.ep-id-card__info {
    min-width: 0;
    flex: 1;
}

.ep-id-card__name {
    font-size: 1rem;
    font-weight: 800;
    color: #1c1917;
    margin: 0;
    line-height: 1.35;
}

.dark .ep-id-card__name {
    color: #fafaf9;
}

.ep-id-card__name-en {
    font-size: 0.72rem;
    color: #78716c;
    margin: 0.1rem 0 0;
    direction: ltr;
    text-align: right;
}

.ep-id-card__meta {
    font-size: 0.75rem;
    font-weight: 600;
    color: #57534e;
    margin: 0.2rem 0 0;
}

.dark .ep-id-card__meta {
    color: #d6d3d1;
}

.ep-id-card__meta--muted {
    font-weight: 500;
    color: #78716c;
}

.ep-id-card__qr-block {
    text-align: center;
    padding: 0.85rem;
    border-radius: 0.9rem;
    background: #fff;
    border: 1px dashed rgba(180, 83, 9, 0.28);
}

.dark .ep-id-card__qr-block {
    background: rgba(0, 0, 0, 0.2);
    border-color: rgba(251, 191, 36, 0.25);
}

.ep-id-card__qr-frame {
    display: inline-block;
    padding: 0.45rem;
    border-radius: 0.65rem;
    background: #fff;
    border: 2px solid #fff7ed;
    box-shadow: inset 0 0 0 1px rgba(180, 83, 9, 0.12);
}

.ep-id-card__qr-frame svg {
    display: block;
    width: 148px;
    height: 148px;
}

.ep-id-card__qr-label {
    font-size: 0.78rem;
    font-weight: 800;
    color: #b45309;
    margin: 0.55rem 0 0.1rem;
}

.ep-id-card__qr-hint {
    font-size: 0.65rem;
    color: #a8a29e;
    margin: 0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ep-id-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1.1rem;
    background: linear-gradient(90deg, #fff7ed, #ffedd5);
    border-top: 1px solid rgba(180, 83, 9, 0.12);
}

.dark .ep-id-card__footer {
    background: linear-gradient(90deg, #292524, #1c1917);
    border-top-color: rgba(251, 191, 36, 0.12);
}

.ep-id-card__number-label {
    display: block;
    font-size: 0.62rem;
    color: #78716c;
    margin-bottom: 0.1rem;
}

.ep-id-card__number-value {
    font-size: 0.95rem;
    font-weight: 800;
    color: #92400e;
    letter-spacing: 0.06em;
    font-family: ui-monospace, monospace;
}

.dark .ep-id-card__number-value {
    color: #fbbf24;
}

.ep-id-card__valid {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: #047857;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: rgba(5, 150, 105, 0.1);
}

.ep-id-card__valid-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    animation: ep-pulse 2s ease infinite;
}

@keyframes ep-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

@media print {
    body * {
        visibility: hidden;
    }

    #employee-badge-card,
    #employee-badge-card * {
        visibility: visible;
    }

    #employee-badge-card {
        position: fixed;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        box-shadow: none;
        border: 1px solid #d6d3d1;
    }
}

.ep-portal__history-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

