/* TTL Frontend v3.1 */
@import url('https://fonts.googleapis.com/css2?family=Antonio:wght@400;600;700&family=Open+Sans:wght@400;500;600&display=swap');

.ttl-wrap {
    --gold:#d4a017; --gold-lt:#f5c542; --gold-dim:rgba(212,160,23,0.13);
    --row-a:#e8e1c8; --row-b:#dcdcdc; --dark:#2c2c2c;
    --green:#27ae60; --red:#e74c3c;
    --font:'Open Sans',sans-serif; --font-cond:'Antonio',sans-serif;
    font-family:var(--font); color:#1a1a1a;
    margin-top:36px; border-radius:10px; overflow:hidden;
    border:2px solid var(--gold); box-shadow:0 4px 24px rgba(0,0,0,0.12);
}

/* HEADER */
.ttl-header { display:flex; align-items:center; gap:14px; padding:16px 20px; background:var(--dark); color:#fff; flex-wrap:wrap; }
.ttl-header-icon { font-size:1.8rem; line-height:1; }
.ttl-title { font-family:var(--font-cond); font-size:1.4rem; font-weight:700; text-transform:uppercase; letter-spacing:1px; color:var(--gold-lt); margin:0 0 2px; }
.ttl-sub { font-size:0.8rem; color:rgba(255,255,255,0.5); margin:0; }

/* TABS */
.ttl-week-tabs { display:flex; gap:5px; margin-left:auto; flex-wrap:wrap; }
.ttl-week-btn { padding:6px 13px; border:2px solid rgba(255,255,255,0.2); border-radius:6px; background:transparent; color:rgba(255,255,255,0.45); font-family:var(--font-cond); font-size:0.85rem; font-weight:700; text-transform:uppercase; letter-spacing:0.5px; cursor:pointer; transition:all 0.15s; white-space:nowrap; }
.ttl-week-btn:hover { border-color:rgba(245,197,66,0.5); color:var(--gold-lt); }
.ttl-week-btn.active { background:var(--gold); border-color:var(--gold); color:#1a1a1a; font-weight:800; }

/* TABLE */
.ttl-table-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.ttl-plan-table { width:100%; border-collapse:collapse; font-size:0.87rem; min-width:500px; }

.ttl-wcol { display:none; }
.ttl-wcol.ttl-aw { display:table-cell; }

.ttl-thead-top th,
.ttl-thead-sub th { background:var(--dark); color:#fff; padding:7px 10px; font-family:var(--font-cond); font-size:0.75rem; font-weight:700; text-transform:uppercase; letter-spacing:0.8px; border:1px solid rgba(255,255,255,0.1); white-space:nowrap; text-align:center; }

.ttl-thead-top .ttl-aw { background:var(--gold) !important; color:#1a1a1a !important; }
.ttl-thead-sub .ttl-aw { background:var(--gold-lt) !important; color:#1a1a1a !important; }
.ttl-wgh-col { background:var(--gold-dim) !important; }
.ttl-thead-top .ttl-wgh-col,
.ttl-thead-sub .ttl-wgh-col { background:#7d5a0a !important; color:#fff !important; }

/* Default alternating rows */
.ttl-row-a { background:var(--row-a); }
.ttl-row-b { background:var(--row-b); }
/* Custom colored rows — color applied inline; cells inherit */
.ttl-row-custom td { background:inherit !important; }

.ttl-plan-table tbody td { padding:7px 10px; border:1px solid rgba(0,0,0,0.08); text-align:center; vertical-align:middle; }
.ttl-name  { text-align:left !important; font-weight:600; white-space:nowrap; min-width:150px; }
.ttl-grp,.ttl-pos { font-weight:700; color:#666; width:30px; font-family:var(--font-cond); }
.ttl-tempo,.ttl-rest { font-size:0.8rem; white-space:nowrap; color:#666; }

/* WGH input */
.ttl-wgh-input { width:64px; text-align:center; padding:5px 6px; border:2px solid rgba(212,160,23,0.3); border-radius:5px; font-family:var(--font); font-size:0.88rem; font-weight:600; background:#fff; color:#1a1a1a; transition:border-color 0.15s,box-shadow 0.15s; outline:none; }
.ttl-wgh-input:focus  { border-color:var(--gold); box-shadow:0 0 0 3px rgba(212,160,23,0.18); }
.ttl-wgh-input.ttl-dirty { border-color:#e67e22; background:#fef9ec; }
.ttl-wgh-input.ttl-saved { border-color:var(--green); background:#eafaf1; }
.ttl-wgh-input.ttl-error { border-color:var(--red); background:#fdedec; }
.ttl-wgh-input::placeholder { color:#bbb; font-weight:400; }

/* Video */
.ttl-play-btn { display:inline-flex; align-items:center; justify-content:center; width:28px; height:28px; background:var(--gold); color:#1a1a1a; border-radius:50%; text-decoration:none; font-size:0.72rem; transition:background 0.15s,transform 0.15s; }
.ttl-play-btn:hover { background:var(--gold-lt); transform:scale(1.12); }
.ttl-no-video { color:#ccc; }

/* Status */
.ttl-status { display:none; padding:8px 20px; font-size:0.82rem; font-weight:600; text-align:right; background:#f8f9fa; border-top:1px solid rgba(0,0,0,0.06); }
.ttl-status.saving { color:#e67e22; }
.ttl-status.ok     { color:var(--green); }
.ttl-status.error  { color:var(--red); }

.ttl-login-notice { padding:20px; text-align:center; color:#666; font-style:italic; border:2px solid var(--gold); border-radius:10px; margin-top:24px; }

.ttl-table-scroll::-webkit-scrollbar { height:5px; }
.ttl-table-scroll::-webkit-scrollbar-track { background:#f0f0f0; }
.ttl-table-scroll::-webkit-scrollbar-thumb { background:var(--gold); border-radius:3px; }

@media (max-width:640px) {
    .ttl-header { flex-direction:column; align-items:flex-start; }
    .ttl-week-tabs { margin-left:0; }
    .ttl-week-btn { padding:5px 10px; font-size:0.78rem; }
    .ttl-wgh-input { width:52px; }
}
