/* ============================================================
   tohtob.com — app.css
   Design: Clean minimal — white, black, red only
   No cursive, no icons, no dots, no decorations
   ============================================================ */

:root {
    --bg:        #ffffff;
    --bg-card:   #f7f7f7;
    --bg-card2:  #efefef;
    --border:    #dddddd;
    --border-2:  #eeeeee;
    --text:      #111111;
    --text-muted:#333333;
    --text-dim:  #555555;
    --black:     #000000;
    --red:       #cc2222;
    --red-hover: #aa1111;
    --red-dim:   rgba(204,34,34,0.08);
    --green:     #1a8a4a;
    --mono:      'Courier New', Courier, monospace;
    --sans:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --transition: 0.15s ease;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--sans);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
button { cursor: pointer; border: none; background: none; font-family: inherit; }
a { color: var(--text); text-decoration: none; }
a:hover { color: var(--black); text-decoration: underline; }
input, textarea { font-family: inherit; }

/* ── Hide all decorative elements ────────────────────────── */
.bg-grid { display: none; }
.bg-glow { display: none; }
.brand-dot { display: none; }
.status-dot { display: none; }
.app-dot { display: none; }

/* ── Brand ────────────────────────────────────────────────── */
.brand { display: flex; align-items: center; margin-bottom: 40px; }
.brand-name {
    font-family: var(--sans);
    font-size: 28px;
    font-weight: 700;
    font-style: normal;
    color: var(--black);
    letter-spacing: -0.5px;
}

/* ── Auth page ────────────────────────────────────────────── */
.auth-page {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    min-height: 100vh; padding: 24px 16px 80px;
    background: var(--bg);
}
.auth-container { width: 100%; max-width: 400px; }
.auth-footer {
    position: fixed; bottom: 0; left: 0; right: 0;
    text-align: center; padding: 12px;
    font-size: 11px; color: var(--text-dim);
    border-top: 1px solid var(--border);
    background: var(--bg);
    letter-spacing: 0.5px;
}

/* ── Notification ─────────────────────────────────────────── */
.notification {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 12px 16px; border: 1px solid var(--border);
    background: var(--bg-card); margin-bottom: 20px;
}
.notification.success { border-color: var(--green); background: #f5fff9; }
.notification.error   { border-color: var(--red); background: #fff5f5; }
.notification.warn    { border-color: #aa8800; background: #fffbf0; }
.notif-icon { font-size: 14px; flex-shrink: 0; padding-top: 2px; }
.notif-title { font-weight: 700; font-size: 13px; margin-bottom: 2px; }
.notif-msg   { font-size: 12px; color: var(--text-muted); }

/* ── Block card ───────────────────────────────────────────── */
.block-card {
    text-align: center; padding: 48px 24px;
    background: var(--bg-card); border: 1px solid var(--border);
}
.block-icon  { font-size: 36px; margin-bottom: 20px; }
.block-title { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.block-sub   { font-size: 13px; color: var(--text-muted); margin-bottom: 28px; line-height: 1.7; }
.block-note  { font-size: 11px; color: var(--text-dim); margin-top: 20px; line-height: 1.7; }
.countdown-wrap {
    background: var(--red-dim); border: 1px solid rgba(204,34,34,0.2);
    padding: 20px; display: inline-block; min-width: 200px; margin-bottom: 8px;
}
.countdown-label { font-size: 10px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 2px; display: block; margin-bottom: 10px; }
.countdown { font-family: var(--mono); font-size: 28px; font-weight: 700; color: var(--red); letter-spacing: 4px; }

/* ── Tabs ─────────────────────────────────────────────────── */
.tab-bar { display: flex; margin-bottom: 24px; border: 1px solid var(--border); }
.tab {
    flex: 1; padding: 11px;
    font-size: 12px; font-weight: 600;
    color: var(--text-muted); background: none;
    text-transform: uppercase; letter-spacing: 1px;
    transition: var(--transition); border: none; font-style: normal;
}
.tab + .tab { border-left: 1px solid var(--border); }
.tab.active { background: var(--black); color: var(--bg); }
.tab:hover:not(.active) { color: var(--black); }

/* ── Panel ────────────────────────────────────────────────── */
.panel { background: var(--bg-card); border: 1px solid var(--border); padding: 28px 24px; }
.panel.hidden { display: none; }
.panel-lead { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; line-height: 1.7; }

/* ── Google button ────────────────────────────────────────── */
.google-btn-wrap { display: flex; justify-content: center; margin-bottom: 20px; }
.divider-text {
    font-size: 11px; color: var(--text-dim); text-align: center;
    line-height: 1.6; padding-top: 16px;
    border-top: 1px solid var(--border); margin-top: 8px;
}

/* ── Form fields ──────────────────────────────────────────── */
.field-group { position: relative; margin-bottom: 20px; }
.field-label {
    display: block; font-size: 11px; font-weight: 700;
    color: var(--text-muted); margin-bottom: 6px;
    text-transform: uppercase; letter-spacing: 1px;
}
.field-input {
    width: 100%; padding: 10px 12px;
    background: var(--bg); border: 1px solid var(--border);
    color: var(--text); font-size: 14px; outline: none;
    transition: var(--transition); font-style: normal;
}
.field-input.mono { font-family: var(--mono); letter-spacing: 2px; font-size: 13px; }
.field-input:focus { border-color: var(--black); }
.field-input::placeholder { color: var(--text-dim); }
.field-counter { position: absolute; right: 0; bottom: -18px; font-size: 10px; color: var(--text-dim); font-family: var(--mono); }
.input-row { display: flex; align-items: stretch; }
.input-row .field-input { flex: 1; }
.toggle-vis {
    padding: 0 12px; background: var(--bg-card);
    border: 1px solid var(--border); border-left: none;
    color: var(--text-muted); transition: var(--transition); flex-shrink: 0;
}
.toggle-vis:hover { color: var(--black); }

/* ── Primary button — RED ─────────────────────────────────── */
.btn-primary {
    width: 100%; padding: 12px;
    background: var(--red); color: white;
    font-size: 13px; font-weight: 700; border: none;
    transition: var(--transition); cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    margin-top: 8px; letter-spacing: 0.5px;
}
.btn-primary:hover:not(:disabled) { background: var(--red-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-loader {
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white; border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.hidden { display: none !important; }

/* ── Dashboard layout ─────────────────────────────────────── */
.dash-page { min-height: 100vh; padding: 0 0 80px; background: var(--bg); }

.dash-header {
    position: sticky; top: 0; z-index: 10;
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 32px; background: var(--bg);
    border-bottom: 2px solid var(--black);
}
.dash-header .brand { margin-bottom: 0; }

/* Sign Out button — RED ─────────────────────────────────── */
.btn-logout {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 18px; font-size: 12px; font-weight: 700;
    color: white; background: var(--red);
    border: none; transition: var(--transition);
    font-family: var(--sans); letter-spacing: 0.5px; cursor: pointer;
}
.btn-logout:hover { background: var(--red-hover); }
.btn-logout svg { display: none; }

.dash-container { max-width: 800px; margin: 0 auto; padding: 40px 24px; }

.dash-hero {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 40px; padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}
.dash-welcome { font-size: 12px; color: var(--text-dim); letter-spacing: 0.5px; }

/* ── Credentials grid ─────────────────────────────────────── */
.credentials-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1px; background: var(--border); border: 2px solid var(--black);
}
.cred-card { padding: 20px; background: var(--bg); transition: var(--transition); }
.cred-card:hover { background: var(--bg-card); }
.cred-header { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.cred-icon { display: none; }
.cred-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); flex: 1; }
.cred-badge {
    font-size: 9px; font-weight: 700; text-transform: uppercase;
    padding: 2px 6px; background: var(--bg-card2); color: var(--text-muted);
    border: 1px solid var(--border); letter-spacing: 0.5px;
}
.cred-badge.secure { background: #f0fff5; color: var(--green); border-color: #aaddbb; }
.cred-value-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.cred-value { flex: 1; font-size: 15px; font-weight: 400; color: var(--text); word-break: break-all; }
.cred-value.mono { font-family: var(--mono); font-size: 14px; letter-spacing: 1px; color: var(--black); font-weight: 700; }
.cred-value.masked { color: var(--text-dim); letter-spacing: 3px; }
.cred-note { font-size: 11px; color: var(--text-dim); }
.copy-btn, .reveal-btn {
    width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
    background: var(--bg-card); border: 1px solid var(--border);
    color: var(--text-dim); flex-shrink: 0; transition: var(--transition);
}
.copy-btn:hover, .reveal-btn:hover { color: var(--black); border-color: var(--black); background: var(--bg-card2); }

/* ── Copy toast ───────────────────────────────────────────── */
.copy-toast {
    position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%) translateY(10px);
    background: var(--black); color: white;
    font-size: 11px; font-weight: 700; letter-spacing: 1px;
    padding: 8px 20px; pointer-events: none; opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease; z-index: 1000;
}
.copy-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Security notice ──────────────────────────────────────── */
.security-notice {
    display: flex; align-items: flex-start; gap: 8px;
    margin-top: 0; padding: 12px 16px;
    background: #fff8f8; border: 1px solid rgba(204,34,34,0.2); border-top: none;
    font-size: 12px; color: var(--text-muted); line-height: 1.6;
}
.security-notice svg { display: none; }

/* ── Section blocks ───────────────────────────────────────── */
.section-block { margin-bottom: 48px; }
.section-heading {
    font-size: 20px; font-weight: 700; font-style: normal;
    color: var(--black); margin-bottom: 6px; letter-spacing: -0.3px;
}
.section-sub { font-size: 12px; color: var(--text-dim); margin-bottom: 20px; line-height: 1.7; }
.last-change-note { color: var(--red) !important; font-size: 11px !important; font-family: var(--mono) !important; }

/* ── Security actions ─────────────────────────────────────── */
.security-actions-grid {
    display: flex; flex-direction: column; gap: 1px;
    background: var(--border); border: 2px solid var(--black); margin-bottom: 24px;
}
.action-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--bg); transition: var(--transition); }
.action-card:hover { background: var(--bg-card); }
.action-card-danger { background: #fff8f8; }
.action-icon { display: none; }
.action-info { flex: 1; }
.action-title { font-size: 14px; font-weight: 700; color: var(--black); margin-bottom: 3px; }
.action-desc { font-size: 11px; color: var(--text-dim); line-height: 1.6; }
.last-change-time { font-size: 10px; color: var(--red); font-family: var(--mono); margin-top: 4px; }

/* ALL action buttons — RED ──────────────────────────────── */
.btn-action {
    padding: 9px 18px; font-size: 12px; font-weight: 700;
    flex-shrink: 0; transition: var(--transition); font-family: var(--sans);
    border: none; background: var(--red); color: white; cursor: pointer;
    letter-spacing: 0.3px; white-space: nowrap;
}
.btn-action:hover { background: var(--red-hover); }
.btn-warning { background: var(--red); color: white; }
.btn-warning:hover { background: var(--red-hover); }
.btn-danger  { background: var(--red); color: white; }
.btn-danger:hover  { background: var(--red-hover); }

/* ── History ──────────────────────────────────────────────── */
.history-block { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); }
.history-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); margin-bottom: 10px; }
.history-list { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.history-item { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; background: var(--bg); font-size: 12px; }
.history-type { font-weight: 700; }
.type-userid  { color: var(--black); }
.type-passkey { color: var(--text-muted); }
.history-date { font-family: var(--mono); color: var(--text-dim); font-size: 11px; }

/* ── Connected apps ───────────────────────────────────────── */
.apps-grid { display: flex; flex-direction: column; gap: 1px; background: var(--border); border: 2px solid var(--black); }
.app-card { display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: var(--bg); transition: var(--transition); }
.app-card:hover { background: var(--bg-card); }
.app-inactive { opacity: 0.5; }
.app-info { display: flex; align-items: center; gap: 10px; flex: 1; }
.app-details { flex: 1; }
.app-name { font-size: 14px; font-weight: 700; color: var(--black); margin-bottom: 2px; }
.app-meta { font-size: 11px; color: var(--text-dim); font-family: var(--mono); }
.time-ago { color: var(--black); font-weight: 700; }
.app-deactivated-note { font-size: 11px; color: var(--red); margin-top: 2px; font-weight: 600; }
.no-apps { font-size: 12px; color: var(--text-dim); padding: 20px; }

/* App toggle buttons — RED ──────────────────────────────── */
.btn-deactivate, .btn-activate {
    padding: 8px 16px; font-size: 12px; font-weight: 700; flex-shrink: 0;
    background: var(--red); color: white; border: none;
    transition: var(--transition); font-family: var(--sans); cursor: pointer;
}
.btn-deactivate:hover, .btn-activate:hover { background: var(--red-hover); }

/* ── How to use ───────────────────────────────────────────── */
.howto-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--border); border: 2px solid var(--black); }
.howto-card { padding: 24px 20px; background: var(--bg); }
.howto-card-alert { background: #fff8f8; }
.howto-num { font-size: 13px; font-family: var(--mono); color: var(--text-dim); font-weight: 700; margin-bottom: 10px; text-transform: uppercase; letter-spacing: 1px; }
.howto-title { font-size: 13px; font-weight: 700; color: var(--black); margin-bottom: 8px; }
.howto-text { font-size: 12px; color: var(--text-muted); line-height: 1.8; }
.howto-text strong { color: var(--black); font-weight: 700; }

/* ── Confirm modal ────────────────────────────────────────── */
.modal-bg {
    position: fixed; inset: 0; z-index: 1000;
    background: rgba(0,0,0,0.5);
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.modal-box { background: var(--bg); border: 2px solid var(--black); padding: 36px 28px; width: 100%; max-width: 400px; text-align: center; }
.modal-icon { font-size: 32px; margin-bottom: 14px; }
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 10px; font-style: normal; }
.modal-msg { font-size: 12px; color: var(--text-muted); line-height: 1.7; margin-bottom: 24px; }
.modal-actions { display: flex; gap: 1px; background: var(--border); }
.btn-modal-cancel {
    flex: 1; padding: 12px; background: var(--bg-card); border: none;
    color: var(--text-muted); font-size: 12px; font-weight: 600;
    font-family: var(--sans); transition: var(--transition); cursor: pointer;
}
.btn-modal-cancel:hover { color: var(--black); background: var(--bg-card2); }
.btn-modal-confirm {
    flex: 1; padding: 12px; background: var(--red); color: white;
    border: none; font-size: 12px; font-weight: 700;
    font-family: var(--sans); transition: var(--transition); cursor: pointer;
}
.btn-modal-confirm:hover { background: var(--red-hover); }

.new-cred-display {
    display: flex; align-items: center; gap: 10px; justify-content: center;
    padding: 18px; margin: 16px 0; background: var(--bg-card); border: 1px solid var(--border);
}
.new-cred-value { font-family: var(--mono); font-size: 18px; color: var(--black); letter-spacing: 2px; font-weight: 700; }
.new-cred-warn { font-size: 11px; color: var(--red); margin-bottom: 18px; line-height: 1.6; font-weight: 600; }

.action-toast {
    position: fixed; bottom: 32px; left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--black); color: white;
    font-size: 12px; font-weight: 700; padding: 10px 20px;
    pointer-events: none; opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease; z-index: 1000;
}
.action-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ── Mobile ───────────────────────────────────────────────── */
@media (max-width: 600px) {
    .dash-header { padding: 14px 16px; }
    .dash-container { padding: 24px 16px; }
    .credentials-grid { grid-template-columns: 1fr; }
    .action-card { flex-direction: column; align-items: flex-start; gap: 10px; }
    .btn-action { width: 100%; text-align: center; }
    .app-card { flex-direction: column; align-items: flex-start; }
    .btn-deactivate, .btn-activate { width: 100%; text-align: center; }
    .howto-grid { grid-template-columns: 1fr; }
    .modal-actions { flex-direction: column; }
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); }
::selection { background: rgba(204,34,34,0.15); }

/* ── Terms & Conditions ───────────────────────────────────── */
.tc-wrap {
    margin-bottom: 16px;
    border: 1px solid var(--border);
    background: var(--bg-card);
}
.tc-label {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 14px; cursor: pointer;
}
.tc-checkbox {
    width: 16px; height: 16px; flex-shrink: 0;
    cursor: pointer; accent-color: var(--red);
}
.tc-text { font-size: 12px; color: var(--text-muted); }
.tc-toggle {
    background: none; border: none; padding: 0;
    font-size: 12px; font-weight: 700; color: var(--red);
    cursor: pointer; text-decoration: underline;
    font-family: var(--sans);
}
.tc-toggle:hover { color: var(--red-hover); }
.tc-content {
    border-top: 1px solid var(--border);
    background: var(--bg);
}
.tc-body { padding: 16px 14px; max-height: 280px; overflow-y: auto; }
.tc-heading {
    font-size: 11px; font-weight: 700; color: var(--black);
    text-transform: uppercase; letter-spacing: 0.8px;
    margin-top: 14px; margin-bottom: 6px;
}
.tc-heading:first-child { margin-top: 0; }
.tc-list {
    list-style: none; padding: 0;
    display: flex; flex-direction: column; gap: 4px;
}
.tc-list li {
    font-size: 11px; color: var(--text-muted);
    line-height: 1.6; padding-left: 12px; position: relative;
}
.tc-list li::before {
    content: '—'; position: absolute; left: 0;
    color: var(--text-dim); font-size: 11px;
}
.tc-note {
    font-size: 11px; color: var(--text-dim);
    margin-top: 14px; line-height: 1.6;
    padding-top: 10px; border-top: 1px solid var(--border-2);
}
.tc-collapse {
    display: block; width: 100%; padding: 8px;
    font-size: 11px; font-weight: 700; color: var(--text-muted);
    background: var(--bg-card); border: none; border-top: 1px solid var(--border);
    cursor: pointer; text-align: center; letter-spacing: 0.5px;
    font-family: var(--sans); transition: var(--transition);
}
.tc-collapse:hover { color: var(--black); background: var(--bg-card2); }

/* ── Footer ───────────────────────────────────────────────── */
.auth-footer a, .dash-footer a {
    color: var(--red); text-decoration: none;
}
.auth-footer a:hover, .dash-footer a:hover {
    text-decoration: underline;
}
.dash-footer {
    text-align: center; padding: 20px;
    font-size: 11px; color: var(--text-dim);
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

.footer-contact {
    margin-top: 4px;
    font-size: 12px;
}
.footer-contact a {
    color: var(--red);
    font-weight: 600;
    text-decoration: none;
}
.footer-contact a:hover { text-decoration: underline; }
.auth-footer { line-height: 1.8; }

/* ── Contact bar ──────────────────────────────────────────── */
.contact-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    margin-top: 20px;
    padding: 14px 0;
    border-top: 1px solid var(--border);
}
.contact-label {
    font-size: 13px;
    font-weight: 700;
    color: #111111;
}
.contact-link {
    font-size: 14px;
    font-weight: 700;
    color: #1a8a4a !important;
    text-decoration: none;
    -webkit-text-fill-color: #1a8a4a;
}
.contact-link:hover {
    text-decoration: underline;
    color: #157a3f !important;
    -webkit-text-fill-color: #157a3f;
}