/* =====================================================================
   Yanmu HR - visual theme (dark icon sidebar + Kanban board language)
   ===================================================================== */

:root {
    --sidebar-bg: #1f2333;
    --sidebar-bg-hover: #2b3049;
    --sidebar-icon: #9aa0b4;
    --sidebar-icon-active: #ffffff;

    --brand: #5b4fe0;
    --brand-dark: #473cc4;

    --status-all: #4b3fa5;
    --status-pending: #e0177a;
    --status-approved: #6f8f1f;
    --status-rejected: #d7263d;

    --bg-page: #f2f3f7;
    --card-shadow: 0 2px 10px rgba(23, 25, 42, 0.06);
    --card-shadow-hover: 0 8px 20px rgba(23, 25, 42, 0.12);
}

body {
    min-height: 100vh;
    background: var(--bg-page);
    color: #2c2f3a;
}

a {
    text-decoration: none;
}

/* ---------------------------------------------------------------------
   App shell: sidebar + topbar + content
   --------------------------------------------------------------------- */
#appShell {
    min-height: 100vh;
}

.app-sidebar {
    width: 84px;
    min-width: 84px;
    background: var(--sidebar-bg);
    min-height: 100vh;
    position: sticky;
    top: 0;
}

.sidebar-link {
    position: relative;
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: var(--sidebar-icon);
    transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-link:hover {
    background: var(--sidebar-bg-hover);
    color: var(--sidebar-icon-active);
}

.sidebar-link.active {
    background: var(--brand);
    color: #fff;
}

.sidebar-link .sidebar-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--status-rejected);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.app-topbar {
    background: #fff;
    border-bottom: 1px solid #e6e7ee;
    position: sticky;
    top: 0;
    z-index: 20;
}

.app-search {
    position: relative;
    max-width: 420px;
}

.app-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa0b4;
}

.app-search input {
    border-radius: 999px;
    border: 1px solid #e6e7ee;
    background: var(--bg-page);
    padding: 0.5rem 1rem 0.5rem 2.5rem;
    width: 100%;
}

.app-search input:focus {
    outline: none;
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(91, 79, 224, 0.12);
}

.topbar-balance-badge {
    background: var(--bg-page);
    border: 1px solid #e6e7ee;
    border-radius: 999px;
    padding: 0.2rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #4b4f5e;
    white-space: nowrap;
}

.app-content {
    max-width: 1600px;
}

/* ---------------------------------------------------------------------
   Kanban board
   --------------------------------------------------------------------- */
.kanban-board {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    padding-bottom: 1rem;
}

.kanban-column {
    flex: 0 0 300px;
    width: 300px;
    display: flex;
    flex-direction: column;
}

.kanban-column-header {
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #fff;
    font-weight: 700;
    margin-bottom: 1rem;
}

.kanban-column-header .count-badge {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.kanban-column-header.bg-all { background: var(--status-all); }
.kanban-column-header.bg-pending { background: var(--status-pending); }
.kanban-column-header.bg-approved { background: var(--status-approved); }
.kanban-column-header.bg-rejected { background: var(--status-rejected); }

.kanban-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.kanban-empty {
    border: 1px dashed #d7d9e4;
    border-radius: 10px;
    padding: 1.5rem 1rem;
    text-align: center;
    color: #9aa0b4;
    font-size: 0.85rem;
}

/* ---------------------------------------------------------------------
   Task-style card
   --------------------------------------------------------------------- */
.task-card {
    background: #fff;
    border-radius: 12px;
    border-top: 4px solid var(--brand);
    box-shadow: var(--card-shadow);
    padding: 1rem 1.1rem;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.task-card:hover {
    box-shadow: var(--card-shadow-hover);
    transform: translateY(-1px);
}

.task-card.border-all { border-top-color: var(--status-all); }
.task-card.border-pending { border-top-color: var(--status-pending); }
.task-card.border-approved { border-top-color: var(--status-approved); }
.task-card.border-rejected { border-top-color: var(--status-rejected); }

.task-card .card-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.6rem;
}

.task-card .card-name {
    font-weight: 700;
    font-size: 0.95rem;
}

.task-card .flag-icon {
    color: #c7cad6;
}

.task-card .flag-icon.flag-urgent {
    color: var(--status-rejected);
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.task-card .card-mid {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.badge-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--bg-page);
    border-radius: 999px;
    padding: 0.2rem 0.55rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #4b4f5e;
}

.task-card .card-id {
    font-weight: 700;
    font-size: 0.85rem;
    color: #2c2f3a;
}

.task-card .card-date {
    color: var(--status-rejected);
    font-weight: 600;
    font-size: 0.78rem;
}

.type-strip {
    display: flex;
    gap: 4px;
    margin-top: 0.75rem;
}

.type-strip span {
    height: 5px;
    flex: 1;
    border-radius: 3px;
    opacity: 0.35;
}

.type-strip span.active {
    opacity: 1;
}

.type-summer_break { background: #f4a300; }
.type-winter_break { background: #2196f3; }
.type-personal     { background: var(--brand); }
.type-casual        { background: #6f8f1f; }
.type-short_leave  { background: #17a2b8; }

.task-card .card-actions {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f1f6;
}

.task-card .card-actions input[type="text"] {
    font-size: 0.78rem;
}

/* ---------------------------------------------------------------------
   Balance summary cards (employee dashboard)
   --------------------------------------------------------------------- */
.balance-card {
    border: none;
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.balance-card .balance-header {
    padding: 0.9rem 1rem 0;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}

.balance-card .balance-body {
    background: #fff;
    border-radius: 14px 14px 0 0;
    margin-top: 0.9rem;
    padding: 1.1rem 1rem 0.5rem;
    text-align: center;
}

.balance-card .balance-value {
    font-size: 2rem;
    font-weight: 700;
}

.balance-card .card-footer {
    background: #fff;
    border: none;
    text-align: center;
    font-size: 0.75rem;
    color: #8a8f9e;
    padding-bottom: 1rem;
}

.bg-summer_break { background: linear-gradient(135deg, #f4a300, #ffc94d); }
.bg-winter_break { background: linear-gradient(135deg, #2196f3, #64b5f6); }
.bg-personal     { background: linear-gradient(135deg, var(--brand), #8f7bff); }
.bg-casual        { background: linear-gradient(135deg, #6f8f1f, #9bbf3e); }
.bg-short_leave  { background: linear-gradient(135deg, #17a2b8, #4fd3e6); }

/* ---------------------------------------------------------------------
   Auth / login page
   --------------------------------------------------------------------- */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--sidebar-bg), var(--brand-dark));
}

/* ---------------------------------------------------------------------
   Misc
   --------------------------------------------------------------------- */
.page-title {
    font-weight: 700;
}

.chip-role {
    background: var(--bg-page);
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: #4b4f5e;
}

@media (max-width: 767.98px) {
    .kanban-column {
        flex: 0 0 82vw;
        width: 82vw;
    }
}
