/* ── TI Timeclock — Frontend Styles ─────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --tc-bg:        #f4f4f5;
  --tc-surface:   #ffffff;
  --tc-border:    #e4e4e7;
  --tc-text:      #18181b;
  --tc-sub:       #71717a;
  --tc-muted:     #a1a1aa;
  --tc-accent:    #3f3f46;
  --tc-accent-lt: #52525b;
  --tc-danger:    #dc2626;
  --tc-success:   #16a34a;
  --tc-radius:    8px;
  --tc-shadow:    0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
}

.titc-wrap * { box-sizing: border-box; margin: 0; padding: 0; font-family: 'Inter', sans-serif; }
.titc-wrap { background: var(--tc-bg); padding: 24px; border-radius: 12px; color: var(--tc-text); }

/* Header */
.titc-header {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--tc-surface); border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius); padding: 16px 20px; margin-bottom: 20px;
  box-shadow: var(--tc-shadow);
}
.titc-header-left { display: flex; align-items: center; gap: 12px; }
.titc-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--tc-accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; flex-shrink: 0;
}
.titc-header-name  { font-size: 15px; font-weight: 600; }
.titc-header-sub   { font-size: 12px; color: var(--tc-sub); margin-top: 1px; }
.titc-header-date  { font-size: 13px; color: var(--tc-sub); font-weight: 500; }

/* Summary cards */
.titc-summary-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px;
}
@media(max-width:700px){ .titc-summary-grid{ grid-template-columns: repeat(2,1fr); } }
.titc-summary-card {
  background: var(--tc-surface); border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius); padding: 16px 18px;
  box-shadow: var(--tc-shadow); transition: border-color .15s;
}
.titc-summary-card:hover { border-color: var(--tc-accent); }
.titc-sc-value { font-size: 26px; font-weight: 700; letter-spacing: -.5px; }
.titc-sc-label { font-size: 12px; font-weight: 600; color: var(--tc-sub); text-transform: uppercase; letter-spacing: .5px; margin-top: 4px; }
.titc-sc-sub   { font-size: 11px; color: var(--tc-muted); margin-top: 3px; }

/* Two-col layout */
.titc-two-col { display: grid; grid-template-columns: 340px 1fr; gap: 16px; }
@media(max-width:860px){ .titc-two-col{ grid-template-columns: 1fr; } }

/* Panel */
.titc-panel {
  background: var(--tc-surface); border: 1px solid var(--tc-border);
  border-radius: var(--tc-radius); padding: 20px;
  box-shadow: var(--tc-shadow);
}
.titc-panel-title { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--tc-sub); margin-bottom: 16px; }

/* Fields */
.titc-field-row { margin-bottom: 14px; }
.titc-label { display: block; font-size: 12px; font-weight: 600; color: var(--tc-sub); margin-bottom: 5px; }
.titc-optional { font-weight: 400; color: var(--tc-muted); }
.titc-input {
  width: 100%; border: 1px solid var(--tc-border); border-radius: 6px;
  padding: 8px 10px; font-size: 14px; color: var(--tc-text);
  background: var(--tc-bg); transition: border-color .15s;
  outline: none;
}
.titc-input:focus { border-color: var(--tc-accent); background: #fff; }
.titc-textarea { resize: vertical; min-height: 56px; }
.titc-two-inputs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* Calc preview */
.titc-calc-preview {
  background: var(--tc-bg); border: 1px solid var(--tc-border);
  border-radius: 6px; padding: 10px 12px; font-size: 13px; font-weight: 600;
  color: var(--tc-accent); margin-bottom: 12px; min-height: 36px;
}

/* Buttons */
.titc-btn-row { display: flex; gap: 8px; }
.titc-btn {
  border: none; border-radius: 6px; padding: 9px 16px; font-size: 13px;
  font-weight: 600; cursor: pointer; transition: background .15s, opacity .15s; line-height: 1;
}
.titc-btn-primary { background: var(--tc-accent); color: #fff; }
.titc-btn-primary:hover { background: var(--tc-accent-lt); }
.titc-btn-ghost   { background: transparent; color: var(--tc-sub); border: 1px solid var(--tc-border); }
.titc-btn-ghost:hover { background: var(--tc-bg); }
.titc-btn-danger  { background: var(--tc-danger); color: #fff; }
.titc-btn-sm      { padding: 7px 12px; font-size: 12px; }

/* Messages */
.titc-msg { font-size: 13px; padding: 8px 12px; border-radius: 6px; margin-bottom: 10px; }
.titc-msg.error   { background: #fef2f2; color: var(--tc-danger); border: 1px solid #fecaca; }
.titc-msg.success { background: #f0fdf4; color: var(--tc-success); border: 1px solid #bbf7d0; }

/* Filter row */
.titc-filter-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.titc-input-sm { width: auto; flex: 1; min-width: 120px; }
.titc-filter-sep { font-size: 12px; color: var(--tc-muted); flex-shrink: 0; }
.titc-range-total { font-size: 13px; font-weight: 600; color: var(--tc-sub); margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--tc-border); }

/* Entries list */
.titc-entries-list { max-height: 420px; overflow-y: auto; }
.titc-entry-card {
  border: 1px solid var(--tc-border); border-radius: 7px;
  padding: 12px 14px; margin-bottom: 8px; background: var(--tc-bg);
  display: flex; align-items: flex-start; gap: 12px; transition: border-color .15s;
}
.titc-entry-card:hover { border-color: var(--tc-accent); }
.titc-entry-main { flex: 1; min-width: 0; }
.titc-entry-date  { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--tc-sub); }
.titc-entry-time  { font-size: 13px; color: var(--tc-text); margin-top: 2px; }
.titc-entry-note  { font-size: 12px; color: var(--tc-muted); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.titc-entry-hrs   { font-size: 18px; font-weight: 700; color: var(--tc-text); flex-shrink: 0; text-align: right; }
.titc-entry-hrs-lbl { font-size: 10px; color: var(--tc-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.titc-entry-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.titc-icon-btn {
  background: none; border: none; cursor: pointer; padding: 4px 6px;
  border-radius: 4px; color: var(--tc-muted); font-size: 13px; transition: color .15s, background .15s;
}
.titc-icon-btn:hover { background: var(--tc-border); color: var(--tc-text); }
.titc-icon-btn.delete:hover { color: var(--tc-danger); }

/* Empty state */
.titc-empty { text-align: center; padding: 32px 16px; color: var(--tc-muted); font-size: 14px; }
.titc-loading { padding: 24px; text-align: center; color: var(--tc-muted); font-size: 13px; }
.titc-notice { background: var(--tc-surface); border: 1px solid var(--tc-border); border-radius: 8px; padding: 20px; color: var(--tc-sub); font-family: 'Inter', sans-serif; font-size: 14px; }

/* Modal */
.titc-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center; z-index: 99999;
}
.titc-modal {
  background: #fff; border-radius: 10px; padding: 28px; width: 340px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.titc-modal-title  { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.titc-modal-body   { font-size: 14px; color: var(--tc-sub); margin-bottom: 20px; }
.titc-modal-footer { display: flex; justify-content: flex-end; gap: 8px; }
