/* ============================================================
   mailai.in — Pro Time Tracker CSS
   tracker.css v3.0
   ============================================================ */

/* ============================================================
   1. HERO SECTION
   ============================================================ */
.hours-hero {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    padding: 14px 24px;
    margin-bottom: 12px;
    border-radius: 12px;
    color: white;
}
.hero-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.month-select {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
}

/* Hero Info Bar */
.hero-info-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px 14px;
    margin-top: 8px;
    background: rgba(0,0,0,0.18);
    border-radius: 8px;
    padding: 6px 16px;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.9);
}
.hero-info-bar .divider { color: rgba(255,255,255,0.2); }
.hero-info-bar strong { color: #fff; }

/* Hero Timer Strip (legacy, kept for compat) */
.hero-timer-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    background: rgba(0,0,0,0.25);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    padding: 12px 20px;
    gap: 16px;
    flex-wrap: nowrap;
}
.hero-timer-meta { display: flex; flex-direction: column; gap: 4px; flex: 1; min-width: 0; }
.hero-timer-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hero-time-row {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.95);
    font-weight: 600;
}
.hero-time-row .yt-label { color: rgba(255,255,255,0.6); font-weight: 500; font-size: 0.82rem; }
.hero-time-row .yt-val   { color: #fff; font-weight: 800; font-size: 1rem; }
.hero-time-row .yt-val-wip { color: #fbbf24; font-weight: 800; font-size: 1rem; }
.hero-time-row .divider  { color: rgba(255,255,255,0.25); }
.hero-wa-hint {
    font-size: 0.76rem;
    color: rgba(255,255,255,0.55);
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ============================================================
   2. HERO BUTTONS & BADGES
   ============================================================ */
.btn-hero-start,
.btn-hero-stop {
    border: none;
    padding: 0 22px;
    height: 44px;
    box-sizing: border-box;
    border-radius: 9px;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: background 0.2s;
    position: relative;
    z-index: 10;
    pointer-events: auto;
    white-space: nowrap;
    color: #fff;
}
.btn-hero-start {
    background: #16a34a;
    box-shadow: 0 4px 14px rgba(22,163,74,0.4);
}
.btn-hero-start:hover  { background: #15803d; }
.btn-hero-start:active { transform: scale(0.97); }

.btn-hero-stop {
    background: #dc2626;
    box-shadow: 0 4px 14px rgba(220,38,38,0.35);
}
.btn-hero-stop:hover  { background: #b91c1c; }
.btn-hero-stop:active { transform: scale(0.97); }

/* Running state badge — same height as buttons */
.badge-running-pill {
    background: #fef08a;
    color: #713f12;
    padding: 0 18px;
    height: 44px;
    box-sizing: border-box;
    border-radius: 9px;
    font-size: 0.92rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    line-height: 1;
    box-shadow: 0 4px 14px rgba(250,204,21,0.3);
}

/* ============================================================
   3. STATS GRID — 3 cards
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 0;
}
.stat-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}
.row-top {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    letter-spacing: 0.05em;
    display: flex;
    justify-content: space-between;
    margin-bottom: 2px;
}
.row-hero {
    font-size: 1.55rem;
    font-weight: 800;
    color: #0f172a;
    margin: 6px 0;
    line-height: 1.15;
}
.hero-sec { font-size: 0.85rem; font-weight: 600; color: #94a3b8; }
.row-context {
    font-size: 0.78rem;
    color: #475569;
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #f1f5f9;
    padding-top: 6px;
    margin-top: 4px;
}

/* Card accent borders & colors */
.card-success { border-left: 4px solid #10b981; }
.card-neutral { border-left: 4px solid #64748b; }
.card-primary { border-left: 4px solid #3b82f6; }
.text-success  { color: #059669; }
.text-primary  { color: #2563eb; }

/* ============================================================
   4. INSIGHT BOX & HELPERS
   ============================================================ */
.insight-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 10px 16px;
    border-radius: 8px;
    margin-top: 8px;
    margin-bottom: 0;
    font-size: 0.83rem;
}
.insight-box ul { gap: 6px; }
.insight-box li { font-size: 0.83rem; }

.pill {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 800;
}
.mini-bar {
    width: 30px;
    height: 3px;
    background: #d1fae5;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 3px;
}
.mini-bar .fill { height: 100%; background: #10b981; }

/* ============================================================
   5. DAILY CALENDAR TABLE
   ============================================================ */
.table-responsive {
    overflow-x: auto;
    border-radius: 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    margin-top: 10px;
}
.hours-table {
    width: 100%;
    border-collapse: collapse;
}
.hours-table th {
    background: #f8fafc;
    padding: 10px 15px;
    font-size: 0.72rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid #e2e8f0;
}
.hours-table td {
    padding: 11px 15px;
    font-size: 0.88rem;
    border-bottom: 1px solid #f1f5f9;
}

/* Working hours badges */
.hours-badge {
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 700;
}
.badge-completed { background: #dcfce7; color: #166534; }
.badge-active    { background: #dbeafe; color: #1e40af; }
.badge-missed    { background: #fee2e2; color: #991b1b; }

/* ============================================================
   6. INLINE SESSION EXPAND (+ / − in table rows)
   ============================================================ */
.session-expand-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 800;
    color: #475569;
    cursor: pointer;
    margin-right: 6px;
    vertical-align: middle;
    transition: all 0.15s;
    line-height: 1;
    flex-shrink: 0;
    padding: 0;
}
.session-expand-btn:hover   { background: #dbeafe; color: #1e40af; border-color: #93c5fd; }
.session-expand-btn.expanded { background: #3b82f6; color: #fff; border-color: #2563eb; }

.session-inline-row { display: none; }
.session-inline-row.open { display: table-row; }

.session-inline-cell {
    padding: 6px 18px 16px 44px;
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}
.session-inline-timeline {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 10px;
}
.session-inline-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.82rem;
    flex-wrap: wrap;
}
.sess-day-total {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    font-size: 0.79rem;
    color: #64748b;
    font-weight: 600;
}
.sess-day-total strong { color: #0f172a; font-size: 0.86rem; }

/* ============================================================
   7. SESSION ITEM COMPONENTS (shared by inline & accordion)
   ============================================================ */
.sessions-count-chip {
    background: #f1f5f9;
    color: #64748b;
    padding: 2px 8px;
    border-radius: 5px;
    font-size: 0.72rem;
    font-weight: 700;
}
.session-num {
    background: #eff6ff;
    color: #1d4ed8;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.session-time-start { color: #15803d; font-weight: 700; }
.session-arrow      { color: #94a3b8; font-size: 0.75rem; }
.session-time-end   { color: #dc2626; font-weight: 700; }
.session-duration {
    margin-left: auto;
    background: #f0fdf4;
    color: #166534;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid #bbf7d0;
    white-space: nowrap;
}
.session-active-badge {
    background: #dcfce7;
    color: #166534;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 800;
    border: 1px solid #86efac;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}
.session-active-dot {
    width: 7px;
    height: 7px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-green 1.5s infinite;
}

/* ============================================================
   8. ANIMATIONS
   ============================================================ */
@keyframes pulse-red-hero {
    0%   { box-shadow: 0 4px 14px rgba(220,38,38,0.4); }
    50%  { box-shadow: 0 4px 22px rgba(220,38,38,0.7); }
    100% { box-shadow: 0 4px 14px rgba(220,38,38,0.4); }
}
@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.3; }
}
@keyframes pulse-blue-dot {
    0%   { box-shadow: 0 0 0 0 rgba(59,130,246,0.7); }
    70%  { box-shadow: 0 0 0 6px rgba(59,130,246,0); }
    100% { box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}
@keyframes pulse-blue {
    0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(59,130,246,0.7); }
    70%  { transform: scale(1);    box-shadow: 0 0 0 6px rgba(59,130,246,0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(59,130,246,0); }
}
@keyframes pulse-red {
    0%   { box-shadow: 0 0 0 0 rgba(239,68,68,0.7); }
    70%  { box-shadow: 0 0 0 10px rgba(239,68,68,0); }
    100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* ============================================================
   9. PUBLIC BLUR OVERLAY
   ============================================================ */
.public-blur {
    filter: blur(5px);
    pointer-events: none;
}

/* ============================================================
   11. SESSION MANAGEMENT (edit / delete / add per day)
   ============================================================ */

/* Show action buttons — hidden by default, shown in manage mode */
.sess-item-actions {
    display: none;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    flex-shrink: 0;
}
.sess-act-btn {
    width: 24px;
    height: 24px;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: all 0.15s;
    line-height: 1;
}
.sess-edit-btn { color: #2563eb; }
.sess-edit-btn:hover { background: #dbeafe; border-color: #93c5fd; }
.sess-del-btn  { color: #dc2626; }
.sess-del-btn:hover  { background: #fee2e2; border-color: #fca5a5; }

/* Add session form — shown in manage mode */
.add-sess-panel {
    display: none;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding: 10px 12px;
    background: #f0fdf4;
    border: 1px dashed #86efac;
    border-radius: 8px;
}
.add-sess-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #166534;
    white-space: nowrap;
}
.sess-save-btn {
    background: #16a34a;
    color: #fff;
    border: none;
    padding: 4px 12px;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.sess-save-btn:hover { background: #15803d; }
.sess-cancel-btn {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 4px 10px;
    border-radius: 5px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.sess-cancel-btn:hover { background: #e2e8f0; }

@media (max-width: 768px) {
    .add-sess-panel { gap: 6px; }
}
/* ============================================================
   12. RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .stats-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .hours-hero { padding: 12px 16px; }
    .hero-timer-strip { flex-direction: column; align-items: flex-start; }
    .hero-timer-actions { width: 100%; justify-content: flex-end; }
    .session-inline-cell { padding: 6px 10px 14px 10px; }
    .hours-table th,
    .hours-table td { padding: 9px 10px; }
    .add-sess-panel { gap: 6px; }
}
