/* AgencyFlow — chỉ dùng font hệ thống, không tải font từ mạng (chạy được offline trong LAN). */

html, body {
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* ---------- Trang đăng nhập ---------- */
.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #1e4f8f 0%, #2d6cb5 60%, #4a90d9 100%);
}

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
}

.af-label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: #48566b;
    margin-bottom: 6px;
}

.af-input {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: .95rem;
    border: 1px solid #c8d0da;
    border-radius: 8px;
    background: #fff;
    color: #16202e;
}

.af-input:focus {
    outline: none;
    border-color: #1e4f8f;
    box-shadow: 0 0 0 3px rgba(30, 79, 143, .15);
}

.af-check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    color: #48566b;
}

.af-submit {
    width: 100%;
    padding: 11px 16px;
    font-size: .95rem;
    font-weight: 600;
    color: #fff;
    background: #1e4f8f;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.af-submit:hover { background: #17406f; }

.af-logout-btn {
    width: 100%;
    padding: 6px 8px;
    background: none;
    border: none;
    text-align: left;
    font: inherit;
    color: inherit;
    cursor: pointer;
}

.af-logout-btn:hover { color: #c62828; }

/* ---------- Thông báo ---------- */
/* Thanh tiêu đề dense cao 48px cắt mất phần trên của huy hiệu; kéo nó xuống trong lòng nút chuông. */
/* Ghim huy hiệu vào góc trong của nút chuông (nút 48px, huy hiệu 20px) - không phụ thuộc
   chiều cao thanh tiêu đề nên desktop và điện thoại đều không bị cắt. */
.mud-appbar .mud-badge-wrapper .mud-badge {
    top: 3px !important;
    right: 3px !important;
    transform: none !important;
}

.notif-dropdown {
    width: 360px;
    max-width: 92vw;
    max-height: 60vh;
    overflow-y: auto;
}

.notif-item {
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.notif-item:hover { background: rgba(30, 79, 143, .06); }
.notif-item.unread { background: rgba(30, 79, 143, .08); border-left: 3px solid #1e4f8f; }

/* ---------- Kanban ---------- */
.kanban-scroll {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 12px;
    align-items: flex-start;
}

.kanban-col {
    min-width: 270px;
    max-width: 270px;
    flex: 0 0 auto;
}

.kanban-col-head {
    padding: 8px 12px;
    font-weight: 600;
    border-bottom: 2px solid var(--mud-palette-primary);
}

.kanban-zone {
    min-height: 120px;
    padding: 8px;
    background: var(--mud-palette-background-grey);
    border-radius: 8px;
}

.kanban-card {
    padding: 8px 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    background: var(--mud-palette-surface);
    border-left: 4px solid var(--mud-palette-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
    cursor: grab;
}

.kanban-card.overdue { border-left-color: var(--mud-palette-error); }
.kanban-card.due-soon { border-left-color: var(--mud-palette-warning); }

/* ---------- Lịch ---------- */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.cal-head {
    text-align: center;
    font-weight: 600;
    padding: 6px 0;
    font-size: .8rem;
}

.cal-cell {
    min-height: 104px;
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 6px;
    padding: 4px;
    overflow: hidden;
    background: var(--mud-palette-surface);
}

.cal-cell.other-month { opacity: .45; }
.cal-cell.today { border-color: var(--mud-palette-primary); border-width: 2px; }

.cal-day { font-size: .75rem; font-weight: 600; margin-bottom: 2px; }

.cal-chip {
    display: block;
    font-size: .7rem;
    line-height: 1.25;
    padding: 2px 5px;
    margin-bottom: 2px;
    border-radius: 4px;
    color: #fff;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---------- Chung ---------- */
.stat-card { height: 100%; }
.stat-value { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.clickable { cursor: pointer; }
.clickable:hover { background: rgba(30, 79, 143, .05); }

.workload-bar { height: 8px; border-radius: 4px; background: var(--mud-palette-lines-default); overflow: hidden; }
.workload-bar > span { display: block; height: 100%; background: var(--mud-palette-primary); }

#blazor-error-ui {
    background: #ffdddd;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, .2);
    display: none;
    left: 0;
    padding: 0.8rem 1.4rem;
    position: fixed;
    width: 100%;
    z-index: 2000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

@media (max-width: 600px) {
    .stat-value { font-size: 1.4rem; }
    .cal-cell { min-height: 76px; }
}
