/* ===== Team Manager Pro — Frontend Styles ===== */
:root {
    --tmp-primary:      #2563eb;
    --tmp-primary-dark: #1d4ed8;
    --tmp-secondary:    #64748b;
    --tmp-success:      #16a34a;
    --tmp-danger:       #dc2626;
    --tmp-warning:      #d97706;
    --tmp-bg:           #f8fafc;
    --tmp-surface:      #ffffff;
    --tmp-border:       #e2e8f0;
    --tmp-text:         #1e293b;
    --tmp-text-muted:   #64748b;
    --tmp-radius:       10px;
    --tmp-shadow:       0 4px 24px rgba(0,0,0,0.08);
    --tmp-shadow-sm:    0 1px 6px rgba(0,0,0,0.06);
}

/* ── Wrap ── */
.tmp-wrap { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: var(--tmp-text); }

/* ── Card ── */
.tmp-form-card {
    background: var(--tmp-surface);
    border: 1px solid var(--tmp-border);
    border-radius: var(--tmp-radius);
    padding: 36px 40px;
    max-width: 480px;
    margin: 0 auto;
    box-shadow: var(--tmp-shadow);
}
.tmp-form-card-wide { max-width: 860px; }

.tmp-form-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 28px;
    color: var(--tmp-text);
}

/* ── Form Elements ── */
.tmp-form-group { margin-bottom: 18px; }
.tmp-form-group label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: 6px; color: var(--tmp-text); }
.tmp-required { color: var(--tmp-danger); }

.tmp-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--tmp-border);
    border-radius: 8px;
    font-size: .95rem;
    color: var(--tmp-text);
    background: var(--tmp-bg);
    box-sizing: border-box;
    transition: border-color .2s, box-shadow .2s;
}
.tmp-input:focus {
    outline: none;
    border-color: var(--tmp-primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.12);
    background: #fff;
}
.tmp-textarea { min-height: 100px; resize: vertical; }
.tmp-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2364748b' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

.tmp-form-row { display: flex; flex-wrap: wrap; gap: 16px; }
.tmp-form-row .tmp-form-group { flex: 1 1 200px; }
.tmp-half   { flex: 1 1 calc(50% - 8px); }
.tmp-quarter { flex: 1 1 calc(25% - 12px); }

.tmp-form-section { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--tmp-border); }
.tmp-form-section:last-of-type { border-bottom: none; }
.tmp-form-section h3 { font-size: 1rem; font-weight: 700; color: var(--tmp-primary); margin: 0 0 16px; text-transform: uppercase; letter-spacing: .05em; }

/* ── Buttons ── */
.tmp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .2s, transform .1s, box-shadow .2s;
    text-decoration: none;
}
.tmp-btn:active { transform: scale(.98); }
.tmp-btn-primary { background: var(--tmp-primary); color: #fff; }
.tmp-btn-primary:hover { background: var(--tmp-primary-dark); box-shadow: 0 4px 12px rgba(37,99,235,.3); }
.tmp-btn-secondary { background: var(--tmp-bg); color: var(--tmp-text); border: 1.5px solid var(--tmp-border); }
.tmp-btn-secondary:hover { background: #fff; border-color: var(--tmp-primary); color: var(--tmp-primary); }
.tmp-btn-danger { background: var(--tmp-danger); color: #fff; }
.tmp-btn-danger:hover { background: #b91c1c; }
.tmp-btn-sm { padding: 6px 14px; font-size: .8rem; }

/* ── Spinner ── */
.tmp-spinner {
    width: 16px; height: 16px;
    border: 2.5px solid rgba(255,255,255,.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: tmp-spin .7s linear infinite;
}
@keyframes tmp-spin { to { transform: rotate(360deg); } }

/* ── Alerts ── */
.tmp-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: .88rem;
    margin-bottom: 16px;
    font-weight: 500;
}
.tmp-alert-error   { background: #fef2f2; color: var(--tmp-danger);  border: 1px solid #fecaca; }
.tmp-alert-success { background: #f0fdf4; color: var(--tmp-success); border: 1px solid #bbf7d0; }
.tmp-notice { padding: 14px 18px; border-radius: 8px; background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; margin-bottom: 20px; }
.tmp-notice-error { background: #fef2f2; color: var(--tmp-danger); border-color: #fecaca; }
.tmp-notice-info  { background: #f0f9ff; color: #0369a1; border-color: #bae6fd; }

.tmp-form-footer { text-align: center; margin-top: 18px; font-size: .875rem; color: var(--tmp-text-muted); }
.tmp-form-footer a { color: var(--tmp-primary); font-weight: 600; text-decoration: none; }

/* ── Days Grid ── */
.tmp-days-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.tmp-day-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border: 1.5px solid var(--tmp-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 600;
    transition: all .2s;
    user-select: none;
}
.tmp-day-label:hover    { border-color: var(--tmp-primary); color: var(--tmp-primary); }
.tmp-day-label.tmp-day-active, .tmp-day-check:checked + span { color: var(--tmp-primary); }
.tmp-day-label input    { display: none; }
.tmp-day-label.checked, .tmp-day-label:has(input:checked) {
    border-color: var(--tmp-primary);
    background: rgba(37,99,235,.07);
    color: var(--tmp-primary);
}

/* ── Tables ── */
.tmp-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.tmp-table th {
    background: var(--tmp-bg);
    padding: 10px 14px;
    text-align: left;
    font-weight: 700;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--tmp-text-muted);
    border-bottom: 2px solid var(--tmp-border);
}
.tmp-table td { padding: 10px 14px; border-bottom: 1px solid var(--tmp-border); vertical-align: middle; }
.tmp-table tbody tr:hover { background: #f8fafc; }
.tmp-table-responsive { overflow-x: auto; border-radius: var(--tmp-radius); border: 1px solid var(--tmp-border); }

/* ── Report specific ── */
.tmp-report-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding: 24px 28px;
    background: var(--tmp-surface);
    border: 1px solid var(--tmp-border);
    border-radius: var(--tmp-radius);
    box-shadow: var(--tmp-shadow-sm);
}
.tmp-report-user-info { display: flex; align-items: center; gap: 16px; }
.tmp-report-user-info h2 { margin: 0 0 4px; font-size: 1.2rem; }
.tmp-report-user-info p  { margin: 0; color: var(--tmp-text-muted); font-size: .875rem; }
.tmp-user-avatar img { border-radius: 50%; }

.tmp-schedule-summary { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px !important; }
.tmp-badge {
    background: rgba(37,99,235,.1);
    color: var(--tmp-primary);
    font-size: .75rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    display: inline-block;
}

.tmp-report-controls { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.tmp-month-form { display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.tmp-filter-group { display: flex; flex-direction: column; gap: 4px; }
.tmp-filter-group label { font-size: .8rem; font-weight: 600; color: var(--tmp-text-muted); }

.tmp-report-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 10px;
}
.tmp-report-title-bar h3 { margin: 0; font-size: 1.05rem; font-weight: 700; }
.tmp-totals-bar { display: flex; gap: 14px; flex-wrap: wrap; }
.tmp-total-chip {
    background: var(--tmp-bg);
    border: 1px solid var(--tmp-border);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: .85rem;
}

.tmp-working-day { }
.tmp-off-day { background: #fafafa !important; color: #bbb; }
.tmp-off-day .tmp-blank-cell { color: #ccc; font-style: italic; }
.tmp-totals-row { background: #f0f9ff !important; font-weight: 700; }

.tmp-editable-cell { cursor: pointer; }
.tmp-editable-cell:hover { background: rgba(37,99,235,.06); }

.tmp-col-date { font-weight: 600; white-space: nowrap; }
.tmp-col-day  { color: var(--tmp-text-muted); }

/* ── Team members ── */
.tmp-add-member-section {
    background: var(--tmp-bg);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}
.tmp-add-member-section h3 { margin: 0 0 16px; font-size: .95rem; font-weight: 700; }

/* ── Modal ── */
.tmp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}
.tmp-modal {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    animation: tmp-modal-in .2s ease;
}
@keyframes tmp-modal-in { from { opacity:0; transform:scale(.95) translateY(10px); } to { opacity:1; transform:scale(1) translateY(0); } }
.tmp-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.tmp-modal-header h3 { margin: 0; font-size: 1.1rem; }
.tmp-modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--tmp-text-muted); line-height: 1; padding: 4px; }
.tmp-modal-body   { padding: 20px 24px; }
.tmp-modal-footer { padding: 0 24px 20px; display: flex; gap: 12px; justify-content: flex-end; }

@media (max-width: 640px) {
    .tmp-form-card { padding: 24px 18px; }
    .tmp-report-header { flex-direction: column; align-items: flex-start; }
    .tmp-form-row .tmp-form-group { flex: 1 1 100%; }
    .tmp-half, .tmp-quarter { flex: 1 1 100%; }
}
