/* Dashboard base */
.tc-dashboard { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; margin: 0 0 24px; }
.tc-dashboard-header { display:flex; flex-direction:column; gap:10px; margin-bottom:12px; }
.tc-dashboard-header h2 { margin:0; font-size:1.25rem; }
.tc-dashboard-controls { display:flex; gap:8px; flex-wrap:wrap; align-items:center; }

/* Filter controls */
.tc-filter select, .tc-filter input[type="search"], .tc-filter input[type="date"] { padding:8px; border:1px solid #ddd; border-radius:6px; font-size:0.95rem; background:#fff; color:#111; }
.tc-filter button { padding:8px 10px; border-radius:6px; }

/* Fix for invisible active/inactive buttons */
.tc-view-toggle .button, .tc-filter .button { color:#111; background: #fff; border:1px solid #ddd; }
.tc-view-toggle .button.active { background:#111; color:#fff; border-color:#111; }

/* Cards */
.tc-cards { display:grid; grid-template-columns:1fr; gap:12px; }
@media(min-width:720px){ .tc-cards { grid-template-columns: repeat(2, 1fr); } }
@media(min-width:1100px){ .tc-cards { grid-template-columns: repeat(3, 1fr); } }

.tc-card { border-radius:10px; padding:12px; border:1px solid #e8e8e8; background:#fff; box-shadow: 0 4px 12px rgba(0,0,0,0.03); display:flex; flex-direction:column; justify-content:space-between; min-height:110px; transition: transform .12s ease, box-shadow .12s ease; }
.tc-card:hover { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); }
.tc-card .tc-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.tc-card .tc-card-title { font-size:1rem; margin:0; line-height:1.15; }
.tc-card .tc-card-meta { font-size:0.8rem; color:#666; display:flex; gap:8px; align-items:center; }
.tc-card .tc-card-body { margin-top:8px; font-size:0.95rem; color:#333; }
.tc-card .tc-card-footer { margin-top:12px; display:flex; justify-content:flex-end; }

/* Badge (status ring variant) */
.tc-app-code-badge { display:inline-block; padding:6px 8px; border-radius:8px; font-weight:600; font-size:0.85rem; color:#222; margin-right:6px; background:rgba(0,0,0,0.02); border: 1.5px solid transparent; box-shadow: 0 1px 0 rgba(0,0,0,0.02) inset; }

/* Large app-code (modal) */
.tc-app-code-large { display:inline-block; padding:8px 10px; border-radius:10px; font-weight:700; font-size:0.95rem; margin-right:8px; }

/* Status color ring — R2: 1.5px border colored to match intent */
.tc-app-code-badge.status-pending { border-color: rgba(245,197,66,0.95); background: rgba(245,197,66,0.07); }
.tc-app-code-badge.status-review { border-color: rgba(142,209,157,0.95); background: rgba(142,209,157,0.06); }
.tc-app-code-badge.status-hired { border-color: rgba(38,166,91,0.95); background: rgba(38,166,91,0.05); }
.tc-app-code-badge.status-rejected { border-color: rgba(229,86,96,0.95); background: rgba(229,86,96,0.04); }
.tc-app-code-badge.status-withdrawn { border-color: rgba(176,116,59,0.95); background: rgba(176,116,59,0.04); }

/* Card left accent + gradients (keeps your card style) */
.status-pending { background: linear-gradient(180deg, #fff9ec, #ffffff); border-left:4px solid #f5c542; }
.status-review { background: linear-gradient(180deg, #f6fff6, #ffffff); border-left:4px solid #8fd19d; }
.status-hired { background: linear-gradient(180deg, #e6ffed, #ffffff); border-left:4px solid #28a745; }
.status-rejected { background: linear-gradient(180deg, #fff0f0, #ffffff); border-left:4px solid #e56060; }
.status-withdrawn { background: linear-gradient(180deg, #faf0e6, #ffffff); border-left:4px solid #b0743b; }

/* Table */
.tc-table { margin-top:12px; }
.tc-table table { width:100%; border-collapse:collapse; min-width:720px; }
.tc-table thead th { text-align:left; padding:10px; border-bottom:1px solid #eee; background:#fafafa; font-weight:600; }
.tc-table th, .tc-table td { padding:10px; border-bottom:1px solid #eee; text-align:left; vertical-align:middle; }

/* Responsive table wrapper (horizontal scroll on small screens) */
.tc-table-responsive { overflow-x:auto; -webkit-overflow-scrolling:touch; padding-bottom:6px; }

/* Highlight rows by status to match card colours */
.tc-table tbody tr[data-status="pending"] td { background: rgba(245,197,66,0.06); }
.tc-table tbody tr[data-status="submitted"] td { background: rgba(245,197,66,0.04); }
.tc-table tbody tr[data-status="review"] td { background: rgba(142,209,157,0.04); }
.tc-table tbody tr[data-status="shortlisted"] td { background: rgba(142,209,157,0.04); }
.tc-table tbody tr[data-status="hired"] td { background: rgba(38,166,91,0.04); }
.tc-table tbody tr[data-status="rejected"] td { background: rgba(229,86,96,0.04); }
.tc-table tbody tr[data-status="withdrawn"] td { background: rgba(176,116,59,0.03); }

/* fallback classes for older browsers */
.status-row-pending td { background: rgba(245,197,66,0.06); }
.status-row-review td { background: rgba(142,209,157,0.04); }

/* Modal modern layout */
.tc-dashboard-modal { display:none; position:fixed; inset:0; z-index:99999; }
.tc-dashboard-modal .tc-dashboard-modal-backdrop { position:fixed; inset:0; background:rgba(0,0,0,0.45); backdrop-filter: blur(4px); }
.tc-dashboard-modal .tc-dashboard-modal-inner { position:fixed; left:50%; top:50%; transform:translate(-50%,-50%); max-width:900px; width:96%; background:#fff; border-radius:10px; padding:18px; box-shadow:0 16px 48px rgba(0,0,0,0.2); z-index:100000; max-height: calc(100vh - 80px); overflow:auto; }

/* modal internal grid */
.tc-modal-grid { display:flex; flex-direction:column; gap:12px; }
.tc-modal-header { display:flex; align-items:center; justify-content:space-between; gap:12px; border-bottom:1px solid #f1f1f1; padding-bottom:8px; }
.tc-modal-title h3 { margin:0; font-size:1.15rem; }
.tc-app-meta { display:flex; gap:8px; align-items:center; margin-top:6px; }
.tc-status-inline { font-weight:600; color:#444; background:#f3f3f3; padding:6px 8px; border-radius:8px; font-size:0.9rem; }

/* modal body with two columns */
.tc-modal-body { display:flex; gap:18px; align-items:flex-start; padding-top:12px; }
.tc-modal-left { flex:1 1 55%; min-width:180px; }
.tc-modal-right { flex:0 0 240px; }

/* message, instructions, actions */
.tc-modal-message { padding-top:8px; border-top:1px solid #f7f7f7; margin-top:8px; }
.tc-modal-actions { display:flex; flex-direction:column; gap:12px; padding-top:8px; }
.tc-modal-instructions { font-size:0.95rem; color:#444; background:#fafafa; border:1px solid #f1f1f1; padding:10px; border-radius:6px; }
.tc-modal-controls { display:flex; flex-direction:column; gap:8px; }
.tc-modal-actions-buttons { margin-top:6px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }

/* buttons */
.button { display:inline-block; padding:8px 12px; border-radius:6px; border:1px solid #ddd; background:#fff; cursor:pointer; color:#111; text-decoration:none; }
.button-primary { background:#0b71e5; color:#fff; border-color: rgba(11,113,229,0.9); }
.button-danger { background:#e95b5b; color:#fff; border-color:#e95b5b; }
.button-call { background:#2b9fdf; color:#fff; border-color:#2b9fdf; }

/* analytics */
.tc-analytics-grid { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:12px; }
.tc-analytics-card { padding:10px; border-radius:8px; background:#fff; border:1px solid #eee; min-width:100px; text-align:center; }

/* small helpers */
.tc-loading, .tc-error { padding:14px; background:#fff; border:1px solid #eee; border-radius:8px; text-align:center; }

/* Responsive tweaks */
@media (max-width: 639px) {
    .tc-dashboard-controls { flex-direction: column; align-items: stretch; }
    .tc-filter { display:flex; gap:8px; flex-wrap:wrap; }
    .tc-filter select, .tc-filter input[type="search"], .tc-filter input[type="date"] { flex:1 1 auto; width:100%; }
    .tc-modal-body { flex-direction:column; }
    .tc-modal-right { flex:1 1 auto; width:100%; }
    .tc-table table { min-width: 600px; } /* small devices get horizontal scroll */
}

/* Small touch improvements */
.tc-card .tc-card-meta time { display:block; color:#777; margin-top:4px; font-size:0.85rem; }
