/* ========================================
   ROOT & RESET
   ======================================== */
:root {
    --orange: #ff6600;
    --orange-dark: #d95200;
    --orange-light: #ff8533;
    --orange-subtle: #fff3ed;

    --black: #111111;
    --sidebar-bg: #141414;
    --sidebar-active: #ff6600;

    --bg: #f0f2f5;
    --card: #ffffff;
    --border: #e0e3e8;
    --text: #1a1a2e;
    --text-muted: #8892a4;
    --text-light: #b0b8c8;

    --green: #22c55e;
    --blue: #3b82f6;
    --yellow: #facc15;
    --red: #ef4444;

    --radius: 10px;
    --radius-sm: 6px;
    --shadow: 0 1px 3px rgba(0, 0, 0, .08), 0 4px 16px rgba(0, 0, 0, .06);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, .14);

    --sidebar-w: 163px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    height: 100%;
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text);
}

a,
button,
[onclick] {
    cursor: pointer;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* ========================================
   LOADING OVERLAY
   ======================================== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    color: var(--text-muted);
    font-size: 14px;
}

.loading-spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin .7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 18px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    background: #1a1a2e;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    transform: translateY(20px);
    opacity: 0;
    transition: transform .3s, opacity .3s;
    max-width: 360px;
}

.toast-error {
    background: var(--red);
}

.toast-show {
    transform: translateY(0);
    opacity: 1;
}

input,
select,
textarea {
    font-family: inherit;
}

/* ========================================
   UTILITIES
   ======================================== */
.hidden {
    display: none !important;
}

.badge {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: .3px;
}

.badge-orange {
    background: var(--orange-subtle);
    color: var(--orange-dark);
}

.badge-green {
    background: #dcfce7;
    color: #15803d;
}

.badge-blue {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-grey {
    background: #f1f3f5;
    color: #6b7280;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--orange);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: none;
    transition: background .2s, transform .1s;
}

.btn-primary:hover {
    background: var(--orange-dark);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary .material-icons-round {
    font-size: 18px;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: background .2s, color .2s;
}

.btn-ghost:hover {
    background: var(--bg);
    color: var(--text);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 5px;
    border-radius: var(--radius-sm);
    transition: background .2s, color .2s;
}

.btn-icon:hover {
    background: var(--bg);
    color: var(--text);
}

.btn-icon .material-icons-round {
    font-size: 18px;
}

.btn-yellow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--orange-subtle);
    color: var(--orange-dark);
    font-size: 14px;
    font-weight: 600;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(217, 82, 0, 0.2);
    transition: background .2s, transform .1s;
}

.btn-yellow:hover {
    background: #ffe3d5;
    transform: translateY(-1px);
}

.btn-yellow:active {
    transform: translateY(0);
}

.btn-yellow .material-icons-round {
    font-size: 18px;
}

.btn-logout {
    background: none;
    border: none;
    color: #666;
    font-size: 12px;
    padding: 0;
    transition: color .2s;
}

.btn-logout:hover {
    color: var(--orange);
}

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: background .2s;
}

.btn-sm-done {
    background: var(--green);
    color: #fff;
}

.btn-sm-done:hover {
    background: #16a34a;
}

.btn-sm-edit {
    background: var(--border);
    color: var(--text);
}

.btn-sm-edit:hover {
    background: #d0d4dc;
}

.btn-sm-delete {
    background: #fee2e2;
    color: var(--red);
}

.btn-sm-delete:hover {
    background: #fecaca;
}

.status-select-badge {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    padding: 3px 20px 3px 8px;
    /* Extra padding for arrow */
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    cursor: pointer;
    outline: none;
    background-repeat: no-repeat;
    background-position: right 4px center;
    background-size: 8px;
    line-height: inherit;
    /* Generic arrow SVG - dark grey */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 0 24 24' width='24' fill='%236b7280'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    min-width: 90px;
}

.status-new {
    background-color: #dbeafe;
    color: #1d4ed8;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 0 24 24' width='24' fill='%231d4ed8'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

.status-processing {
    background-color: var(--orange-subtle);
    color: var(--orange-dark);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 0 24 24' width='24' fill='%23c2410c'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

.status-done {
    background-color: #f1f3f5;
    color: #6b7280;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 0 24 24' width='24' fill='%236b7280'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

.btn-icon-sm {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: color .2s, background .2s;
}

.btn-icon-sm:hover {
    color: var(--orange);
    background: rgba(0, 0, 0, 0.05);
}

.btn-icon-sm .material-icons-round {
    font-size: 16px;
}

/* ========================================
   LOGIN
   ======================================== */
.login-overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(135deg, #111 0%, #2a1a00 50%, #111 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.login-box {
    background: var(--card);
    border-radius: 16px;
    padding: 40px 48px;
    width: 90%;
    max-width: 700px;
    box-shadow: var(--shadow-lg);
}

.login-logo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 32px;
}

.login-logo .logo-icon {
    width: 54px;
    height: 54px;
    background: var(--orange);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0;
}

.login-logo .logo-icon .material-icons-round {
    font-size: 30px;
}

.login-logo h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--black);
}

.login-logo p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.login-box h2 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 16px;
}

.user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 12px;
}

.user-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 8px;
    border-radius: var(--radius);
    background: var(--bg);
    border: 2px solid transparent;
    transition: border-color .2s, transform .2s, box-shadow .2s;
}

.user-tile:hover {
    border-color: var(--orange);
    transform: translateY(-4px);
    box-shadow: 0 6px 20px rgba(255, 102, 0, .15);
}

.user-tile span {
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    letter-spacing: 0;
}

/* ========================================
   APP LAYOUT
   ======================================== */
.app {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.brand-icon {
    color: var(--orange);
    display: flex;
    align-items: center;
}

.brand-icon .material-icons-round {
    font-size: 22px;
}

.brand-name {
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .2px;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: rgba(255, 255, 255, .6);
    font-size: 14px;
    font-weight: 500;
    transition: background .2s, color .2s;
    user-select: none;
}

.nav-item .material-icons-round {
    font-size: 20px;
}

.nav-item:hover {
    background: rgba(255, 255, 255, .08);
    color: rgba(255, 255, 255, .9);
}

.nav-item.active {
    background: var(--orange);
    color: #fff;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 14px;
    border-top: 1px solid rgba(255, 255, 255, .07);
}

.sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sidebar-user-info span {
    color: rgba(255, 255, 255, .8);
    font-size: 13px;
    font-weight: 500;
}

/* Main area */
.main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.topbar {
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar h2 {
    font-size: 20px;
    font-weight: 600;
}

.content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px 28px;
}

/* ========================================
   CARDS / SECTIONS
   ======================================== */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px;
    margin-bottom: 20px;
    flex-shrink: 0;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* ========================================
   TASK CARDS (Team view)
   ======================================== */
.task-row-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

@media (min-width: 900px) {
    .task-row-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 4px 10px;
    }
}

.task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 1024px) {
    .task-list {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        align-items: start;
    }
}

.task-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 4px solid var(--orange);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    transition: box-shadow .2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.task-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.task-card.done {
    border-left-color: #d1d5db;
    opacity: .65;
}

.task-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.task-card-top h4 {
    font-size: 14px;
    font-weight: 600;
}

.task-card-top h4.done-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

.task-card-meta i {
    font-size: 14px;
    vertical-align: middle;
    margin-right: 2px;
}

.task-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin-top: 10px;
}

.task-card-actions-left {
    display: flex;
    gap: 6px;
    align-items: center;
}

.task-card-actions-right {
    display: flex;
    gap: 6px;
    align-items: center;
}

/* ========================================
   COMPACT TASK ROWS (Dashboard)
   ======================================== */
.task-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: var(--card);
    border: 1px solid var(--border);
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: background .15s, box-shadow .15s;
}

.task-row:hover {
    background: #f8fafc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}

.task-row.done {
    opacity: .55;
}

.task-row.today-task {
    border-left-color: #2563eb;
    background: #eff6ff;
}

.task-row.today-task:hover {
    background: #dbeafe;
}

.task-row.overdue-task {
    border-left-color: var(--red);
    background: #fff5f5;
}

.task-row.overdue-task:hover {
    background: #fee2e2;
}

.task-row-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.task-row-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.task-row-title-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.task-row-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.task-row-title.done-text {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-row-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.task-row-meta i {
    font-size: 13px;
    vertical-align: middle;
    margin-right: 2px;
}

.task-row-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.task-row-avs {
    display: flex;
    gap: 2px;
}

.task-row-av {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
}

.badge-today {
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: .3px;
}

.badge-overdue {
    background: #fee2e2;
    color: var(--red);
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
}

.empty-state {
    text-align: center;
    padding: 32px;
    color: var(--text-muted);
    font-size: 14px;
}

.empty-state i {
    font-size: 36px;
    margin-bottom: 8px;
    display: block;
}


/* ========================================
   MONTHLY CALENDAR
   ======================================== */

/* Navigation bar */
.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}

.cal-month-label {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.cal-nav-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: background .2s, color .2s;
}

.cal-nav-btn:hover {
    background: var(--bg);
    color: var(--text);
}

.cal-nav-btn .material-icons-round {
    font-size: 18px;
}

/* 7-column grid */
.cal-month-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.cal-dow-header {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 4px 0 8px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.cal-day-blank {
    display: block;
    /* spacer before 1st of month */
}

.cal-day-cell2 {
    border-radius: var(--radius-sm);
    padding: 6px;
    min-height: 52px;
    background: var(--bg);
    display: flex;
    flex-direction: column;
    gap: 4px;
    transition: background .15s;
    overflow: hidden;
}

.cal-day-cell2:hover {
    background: #e6e9f0;
}

.cal-day-cell2.weekend {
    background: #f9f9fb;
}

.cal-day-cell2.today {
    background: var(--orange-subtle);
    outline: 2px solid var(--orange);
    outline-offset: -2px;
}

.cal-day-num {
    font-size: 12px;
    color: var(--text);
    line-height: 1;
}

.cal-day-cell2.weekend .cal-day-num {
    color: var(--text-muted);
}

.cal-day-cell2.today .cal-day-num {
    color: var(--orange-dark);
}

/* Custom tooltip for calendar cells with tasks */
[data-tip] {
    position: relative;
}

[data-tip]::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: #1a1a2e;
    color: #fff;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.6;
    white-space: pre-line;
    z-index: 500;
    min-width: 180px;
    max-width: 280px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
    pointer-events: none;
    opacity: 0;
    transition: opacity .15s ease;
}

[data-tip]:hover::after {
    opacity: 1;
}


.cal-dots {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: 2px;
}

.cal-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Event bars inside calendar cells */
.cal-event-bars {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 3px;
}

.cal-event-bar {
    font-size: 10px;
    font-weight: 600;
    color: #fff;
    background: #7c3aed;
    border-radius: 3px;
    padding: 1px 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: default;
    opacity: .9;
    max-width: 100%;
    min-width: 0;
}

.cal-event-bar:hover {
    opacity: 1;
}



/* ========================================
   TEAM VIEW — GANTT-like timeline
   ======================================== */
.team-section {
    margin-bottom: 24px;
}

.team-user-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.team-tasks {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

@media (min-width: 1024px) {
    .team-tasks {
        grid-template-columns: repeat(3, 1fr);
        align-items: start;
    }
}

.timeline-bar-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    background: #f8f9fa;
    border: 1px solid var(--border);
    padding: 6px;
    border-radius: var(--radius-sm);
}

.timeline-bar {
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    min-width: 60px;
}

.timeline-bar.done {
    filter: grayscale(.9);
    opacity: .5;
}

/* ========================================
   SETUP
   ======================================== */
.setup-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.setup-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 12px;
}

.setup-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
}

.setup-item-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.setup-add-row {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.setup-add-row input {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    outline: none;
    transition: border-color .2s;
}

.setup-add-row input:focus {
    border-color: var(--orange);
}

.setup-add-row button {
    background: var(--orange);
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    padding: 0 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}

.setup-add-row button:hover {
    background: var(--orange-dark);
}

/* ========================================
   MODAL
   ======================================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 20px;
}

.modal {
    background: var(--card);
    border-radius: 14px;
    width: 100%;
    max-width: 720px;
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-sm {
    max-width: 380px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-header h3 {
    font-size: 17px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    border-radius: 6px;
    padding: 4px;
    transition: background .2s;
}

.modal-close:hover {
    background: var(--bg);
    color: var(--text);
}

.modal-close .material-icons-round {
    font-size: 20px;
}

.modal-body {
    padding: 20px 24px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
}

.modal-footer .btn-primary,
.modal-footer .btn-ghost {
    width: auto;
    flex-shrink: 0;
}

/* ========================================
   FORM FIELDS
   ======================================== */
.field {
    margin-bottom: 14px;
}

.field-row {
    display: flex;
    gap: 14px;
}

.field-row .field {
    flex: 1;
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: 6px;
}

.req {
    color: var(--orange);
}

.field input,
.field select,
.field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    background: var(--card);
    color: var(--text);
    transition: border-color .2s, box-shadow .2s;
    outline: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    border-color: var(--orange);
    box-shadow: 0 0 0 3px rgba(255, 102, 0, .1);
}

.field textarea {
    resize: vertical;
}

/* Pill checkboxes */
.pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pill-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px 4px 6px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    user-select: none;
    white-space: nowrap;
}

.pill-item input[type="checkbox"] {
    accent-color: var(--orange);
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

/* tiny avatar inside pill */
.pill-item .pill-avatar {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    flex-shrink: 0;
}

.pill-item:has(input:checked) {
    border-color: var(--orange);
    background: var(--orange-subtle);
    color: var(--orange-dark);
}

/* Radio buttons — compact inline */
.radio-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.radio-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: var(--bg);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    user-select: none;
    white-space: nowrap;
}

.radio-item input {
    accent-color: var(--orange);
    width: 13px;
    height: 13px;
}

.radio-item:has(input:checked) {
    border-color: var(--orange);
    background: var(--orange-subtle);
    color: var(--orange-dark);
}

.radio-item span {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.radio-item span .material-icons-round {
    font-size: 14px;
}

/* ========================================
   EVENT SETUP UI
   ======================================== */
.ev-block {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 8px;
    overflow: hidden;
}

.ev-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--card);
    gap: 8px;
}

.ev-summary-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    min-width: 0;
}

.ev-edit-form {
    border-top: 1px solid var(--border);
    background: #fafbfd;
    padding: 14px 12px;
}

.ev-edit-form.hidden {
    display: none;
}

.ev-edit-fields {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ev-edit-fields input[type="text"],
.ev-edit-fields input[type="date"] {
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13px;
    background: var(--card);
}

.ev-date-label {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.ev-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
}

.ev-edit-actions button {
    padding: 6px 14px;
    font-size: 13px;
}

/* Per-participant rows */
.ev-part-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.ev-part-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
}

.ev-part-check {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    width: 100%;
    font-weight: 500;
}

.ev-part-check input[type="checkbox"] {
    accent-color: var(--orange);
    width: 14px;
    height: 14px;
}

.ev-part-dates {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    width: 100%;
}

.ev-part-dates .ev-date-label {
    min-width: 16px;
}

.ev-part-dates input[type="date"] {
    padding: 2px 4px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 11px;
    background: var(--bg);
    width: 100%;
    min-width: 0;
    /* allows shrinking in flex */
}

/* ========================================
   CALENDAR CONTEXT MENU
   ======================================== */
.cal-ctx-menu {
    position: fixed;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 4px 0;
    z-index: 9000;
    min-width: 160px;
}

.cal-ctx-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}

.cal-ctx-item:hover {
    background: var(--orange-subtle);
    color: var(--orange-dark);
}

.cal-ctx-item .material-icons-round {
    font-size: 16px;
    color: var(--orange);
}

.cal-ctx-sep {
    height: 1px;
    background: var(--border);
    margin: 4px 0;
}

/* ========================================
   MOBILE MENU
   ======================================== */
.mobile-only {
    display: none;
}

.mobile-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: opacity .3s, visibility .3s;
}

.mobile-backdrop.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 1024px) {
    .mobile-only {
        display: inline-flex;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 999;
        transform: translateX(-100%);
        transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: none;
        width: 280px;
    }

    .sidebar.open {
        transform: translateX(0);
        box-shadow: 5px 0 25px rgba(0, 0, 0, 0.2);
    }

    /* Mobile dashboard: úkoly → notýsek → kalendář */
    .dashboard-cal-row {
        flex-direction: column;
    }

    .dashboard-note-col {
        order: 1;
        min-width: 0;
        width: 100%;
    }

    .dashboard-cal-col {
        order: 2;
        width: 100%;
    }

    .notepad-ta {
        min-height: 160px;
    }
}

/* ========================================
   ATTENDANCE
   ======================================== */
.attendance-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.attendance-controls {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn-attendance {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: none;
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: transform .2s, box-shadow .2s, opacity .3s, filter .3s;
}

.btn-attendance:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-attendance:active:not(:disabled) {
    transform: scale(0.95);
}

.btn-attendance:disabled {
    cursor: not-allowed;
    opacity: 0.5;
    background: #e5e7eb !important;
    color: #9ca3af !important;
    box-shadow: none;
}

.btn-arrival {
    background: linear-gradient(135deg, #22c55e, #16a34a);
}

.btn-departure {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-attendance i {
    font-size: 40px;
    margin-bottom: 8px;
}

/* Month Navigation */
.month-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.month-nav button {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 5px;
    border-radius: 50%;
}

.month-nav button:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-dark);
}

/* Attendance Table */
.attendance-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.attendance-table th {
    text-align: left;
    padding: 10px 12px;
    color: var(--text-muted);
    font-weight: 500;
    border-bottom: 1px solid var(--border);
}

.attendance-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
    color: var(--text-dark);
    vertical-align: middle;
}

/* Attendance Table */
.attendance-table {
    display: none;
    /* Hide old table */
}

/* 5-Column Grid */
.att-week-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 10px;
    align-items: start;
}

@media (max-width: 1024px) {
    .att-week-grid {
        grid-template-columns: repeat(1, 1fr);
        /* Stack on mobile */
    }
}

.att-col-header {
    text-align: center;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-muted);
    font-size: 14px;
    text-transform: uppercase;
}

.att-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.att-card.today {
    border-color: var(--blue);
    background: #eff6ff;
}

.att-card.absence {
    background: #f9fafb;
    border-style: dashed;
}

.att-date {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-dark);
}

.att-inputs {
    display: flex;
    gap: 5px;
}

.att-inputs input {
    width: 100%;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.att-inputs input:focus {
    border-color: var(--blue);
    outline: none;
}

.att-total {
    font-size: 12px;
    text-align: right;
    font-weight: 600;
    color: var(--text-muted);
    border-top: 1px solid #eee;
    padding-top: 4px;
}

.att-abs-label {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    font-size: 12px;
    padding: 8px 0;
}

.att-footer {
    text-align: right;
    font-size: 16px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
    color: var(--text-dark);
}

.attendance-row-today {
    background-color: #f0f9ff;
    /* Light blue highlight for today */
}

.att-time {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.att-absence {
    color: var(--text-muted);
    font-style: italic;
    background: #f9fafb;
}

.att-weekend {
    background: #fdfdfd;
    color: #ccc;
}

.att-total-row td {
    border-top: 2px solid var(--border);
    font-weight: 700;
    background: #f8fafc;
}

/* ========================================
   CALENDAR UNIFIED TOOLTIP
   ======================================== */
#cal-tooltip {
    position: fixed;
    z-index: 9999;
    pointer-events: none;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 10px 14px;
    min-width: 180px;
    max-width: 280px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity .15s, transform .15s;
}

#cal-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

.cal-tip-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.cal-tip-icon {
    font-size: 16px;
    flex-shrink: 0;
    margin-top: 1px;
}

.cal-tip-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.3;
    min-width: 0;
}

.cal-tip-sub {
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
}

/* ========================================
   EVENTS VIEW
   ======================================== */
.ev-filter-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.ev-filter-tab {
    padding: 7px 18px;
    border-radius: 20px;
    border: 1px solid var(--border);
    background: var(--card);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: background .2s, color .2s, border-color .2s;
}

.ev-filter-tab:hover {
    background: var(--bg);
    color: var(--text);
}

.ev-filter-tab.active {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
}

.ev-group-header {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .7px;
    color: var(--text-muted);
    margin: 8px 0 12px;
}

.ev-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.ev-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    overflow: hidden;
    transition: box-shadow .2s, transform .15s;
}

.ev-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.ev-card-strip {
    width: 5px;
    flex-shrink: 0;
}

.ev-card-body {
    flex: 1;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.ev-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ev-card-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ev-card-name-link {
    cursor: pointer;
    transition: color .15s;
}

.ev-card-name-link:hover {
    color: var(--orange);
    text-decoration: underline;
}

.ev-card-date {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
}

.ev-card-date .material-icons-round {
    font-size: 14px;
}

.ev-card-parts {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.ev-part-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    cursor: default;
}

.ev-card-tasks {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg);
    padding: 3px 8px;
    border-radius: 20px;
    width: fit-content;
}

.ev-card-tasks .material-icons-round {
    font-size: 14px;
    color: var(--orange);
}

.ev-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

/* ========================================
   EVENT MODAL TABS
   ======================================== */
.ev-modal-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border);
    padding: 0 20px;
    background: var(--card);
}

.ev-modal-tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color .2s, border-color .2s;
}

.ev-modal-tab:hover {
    color: var(--text);
}

.ev-modal-tab.active {
    color: var(--orange);
    border-bottom-color: var(--orange);
    font-weight: 600;
}

.ev-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--orange-subtle);
    color: var(--orange-dark);
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
}

.ev-modal-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 80px;
    max-height: 340px;
    overflow-y: auto;
}

.ev-task-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    background: var(--bg);
    transition: background .15s;
}

.ev-task-row:hover {
    background: #edf2f7;
}

.ev-task-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.ev-task-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ev-task-title.done {
    text-decoration: line-through;
    opacity: .55;
}

.ev-task-avs {
    display: flex;
    gap: 3px;
}

/* ========================================
   NOTES PANEL — TASK TITLE BAR
   ======================================== */
.notes-task-title-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.notes-task-title-bar .material-icons-round {
    font-size: 18px;
    color: var(--orange);
    flex-shrink: 0;
}

/* ========================================
   DASHBOARD — NO-DATE DIVIDER
   ======================================== */
.dashboard-no-date-divider {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 2px;
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.dashboard-no-date-divider::before,
.dashboard-no-date-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* ========================================
   PRIVACY TOGGLE BUTTON
   ======================================== */
.btn-privacy-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg);
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: background .2s, color .2s, border-color .2s;
}

.btn-privacy-toggle:hover {
    background: var(--orange-subtle);
    color: var(--orange-dark);
    border-color: var(--orange-light);
}

.btn-privacy-toggle .material-icons-round {
    font-size: 20px;
}

.btn-privacy-toggle.privacy-private {
    background: #fef3c7;
    color: #92400e;
    border-color: #fde68a;
}

.btn-privacy-toggle.privacy-private:hover {
    background: #fde68a;
}

/* ========================================
   TASK NOTES FEED
   ======================================== */
.notes-section-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted);
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.notes-section-label .material-icons-round {
    font-size: 16px;
}

.notes-feed {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-height: 80px;
    max-height: 320px;
    overflow-y: auto;
    margin-bottom: 14px;
    padding-right: 4px;
}

.notes-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 80px;
    color: var(--text-light);
    font-size: 13px;
}

.notes-empty .material-icons-round {
    font-size: 28px;
    color: var(--border);
}

.note-bubble {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    position: relative;
    transition: background .15s;
}

.note-bubble:hover {
    background: #f0f4f9;
}

.note-bubble.note-mine {
    background: var(--orange-subtle);
    border-color: rgba(255, 102, 0, 0.15);
}

.note-bubble.note-mine:hover {
    background: #ffe3d0;
}

.note-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.note-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 11px;
    flex-shrink: 0;
}

.note-author {
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.note-ts {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: 2px;
}

.note-text {
    font-size: 13px;
    color: var(--text);
    line-height: 1.55;
    white-space: pre-wrap;
    word-break: break-word;
}

.note-del-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    color: var(--text-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0;
    transition: opacity .2s, color .2s, background .2s;
}

.note-del-btn .material-icons-round {
    font-size: 16px;
}

.note-bubble:hover .note-del-btn {
    opacity: 1;
}

.note-del-btn:hover {
    color: var(--red);
    background: #fee2e2;
}

.notes-input-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
}

.notes-input-row textarea {
    flex: 1;
    resize: vertical;
    min-height: 56px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text);
    background: var(--card);
    transition: border-color .2s;
}

.notes-input-row textarea:focus {
    outline: none;
    border-color: var(--orange);
}

.notes-send-btn {
    height: 38px;
    width: 38px;
    padding: 0 !important;
    justify-content: center;
    flex-shrink: 0;
}

.notes-send-btn .material-icons-round {
    font-size: 18px;
}

/* Hide native calendar / clock picker icons to save space */
.no-picker-icon::-webkit-calendar-picker-indicator {
    display: none;
}
.no-picker-icon::-webkit-inner-spin-button {
    display: none;
}

/* Task status select — coloured native select in modal */
.task-status-select {
    font-size: 12px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    border: none;
    cursor: pointer;
    min-width: 108px;
}

.task-status-zadany {
    background: #f0fdf4 !important;
    color: #166534 !important;
}

.task-status-new {
    background: #dbeafe !important;
    color: #1d4ed8 !important;
}

.task-status-processing {
    background: #ffedd5 !important;
    color: #c2410c !important;
}

.task-status-done {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
}

/* ========================================
   DASHBOARD CALENDAR + NOTEPAD LAYOUT
   ======================================== */
.dashboard-cal-row {
    display: flex;
    gap: 16px;
    align-items: stretch;
    margin-bottom: 0;
}

.dashboard-cal-col {
    flex: 72;
    min-width: 0;
}

.dashboard-note-col {
    flex: 28;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.dashboard-note-col .notepad-card {
    flex: 1;
}

.cal-hint {
    font-size: 11px;
    color: var(--text-muted);
    padding: 6px 4px 2px;
    display: flex;
    align-items: center;
    line-height: 1.4;
    opacity: .75;
}

/* ========================================
   NOTEPAD (NOTÝSEK)
   ======================================== */
.notepad-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    height: 100%;
}

.notepad-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 8px;
    border-bottom: 1px solid var(--border);
    gap: 8px;
    flex-shrink: 0;
}

.notepad-tabs {
    display: flex;
    gap: 4px;
}

.notepad-tab {
    padding: 4px 10px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: transparent;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}

.notepad-tab:hover {
    background: var(--bg);
    color: var(--text);
}

.notepad-tab.active {
    background: var(--orange);
    border-color: var(--orange);
    color: #fff;
}

.notepad-ta {
    flex: 1;
    width: 100%;
    min-height: 220px;
    resize: none;
    border: none;
    border-radius: 0;
    padding: 12px 14px;
    font-size: 13px;
    font-family: inherit;
    line-height: 1.6;
    background: var(--card);
    color: var(--text);
    outline: none;
    box-sizing: border-box;
    transition: background .2s;
}

.notepad-ta:focus {
    background: color-mix(in srgb, var(--card) 95%, var(--orange) 5%);
}

.notepad-ta::placeholder {
    color: var(--text-muted);
    font-style: italic;
    opacity: .7;
}

.notepad-footer {
    padding: 8px 14px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    flex-shrink: 0;
}