/* W PARK NATIONAL TITLE - EXECUTIVE DASHBOARD */
/* Black and Gold. White Glove. */

:root {
    --black: #0a0a0a;
    --black-soft: #141414;
    --black-card: #1a1a1a;
    --black-hover: #222222;
    --gold: #c9a84c;
    --gold-light: #e0c872;
    --gold-dark: #a88a32;
    --gold-muted: rgba(201, 168, 76, 0.15);
    --gold-border: rgba(201, 168, 76, 0.25);
    --white: #f5f5f0;
    --white-muted: #b0afa8;
    --white-dim: #787872;
    --red: #e74c3c;
    --red-muted: rgba(231, 76, 60, 0.15);
    --green: #27ae60;
    --green-muted: rgba(39, 174, 96, 0.15);
    --blue: #3498db;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow: 0 2px 12px rgba(0,0,0,0.4);
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-body);
    background: var(--black);
    color: var(--white);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* LOGIN */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--black) 0%, #1a1510 100%);
}

.login-card {
    text-align: center;
    padding: 48px 40px;
    background: var(--black-card);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-lg);
    width: 380px;
    box-shadow: var(--shadow);
}

.login-logo {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.login-title {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 4px;
}

.login-subtitle {
    color: var(--white-dim);
    font-size: 13px;
    font-weight: 300;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 32px;
}

#login-form input {
    width: 100%;
    padding: 14px 16px;
    background: var(--black);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 15px;
    font-family: var(--font-body);
    outline: none;
    transition: border-color 0.2s;
}

#login-form input:focus {
    border-color: var(--gold);
}

#login-form button {
    width: 100%;
    padding: 14px;
    margin-top: 16px;
    background: var(--gold);
    color: var(--black);
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background 0.2s;
}

#login-form button:hover { background: var(--gold-light); }

.login-error {
    color: var(--red);
    font-size: 13px;
    margin-top: 12px;
    min-height: 20px;
}

/* HEADER */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: var(--black-soft);
    border-bottom: 1px solid var(--gold-border);
}

.header-left { display: flex; align-items: center; gap: 16px; }

.logo {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 700;
    color: var(--gold);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--gold);
    border-radius: var(--radius);
}

.header-text h1 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
}

.header-date {
    font-size: 12px;
    color: var(--white-dim);
    font-weight: 300;
}

.header-right { display: flex; align-items: center; gap: 16px; }

.header-greeting {
    font-size: 13px;
    color: var(--white-muted);
}

.logout-btn {
    padding: 6px 16px;
    background: transparent;
    border: 1px solid var(--gold-border);
    border-radius: var(--radius);
    color: var(--white-dim);
    font-size: 12px;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all 0.2s;
}

.logout-btn:hover { border-color: var(--gold); color: var(--gold); }

/* TAB BAR */
.tab-bar {
    display: flex;
    background: var(--black-soft);
    border-bottom: 1px solid var(--gold-border);
    padding: 0 24px;
    overflow-x: auto;
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--white-dim);
    font-size: 13px;
    font-family: var(--font-body);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab:hover { color: var(--white-muted); }

.tab.active {
    color: var(--gold);
    border-bottom-color: var(--gold);
}

.tab-icon { font-size: 16px; }

/* CONTENT */
.content {
    padding: 24px 32px;
    max-width: 1400px;
    margin: 0 auto;
}

.tab-content { display: none; }
.tab-content.active { display: block; }

.tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.tab-header h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
}

.tab-meta {
    font-size: 13px;
    color: var(--white-dim);
}

/* CARDS */
.briefing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.card {
    background: var(--black-card);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    transition: border-color 0.2s;
}

.card:hover { border-color: var(--gold-dark); }

.card-full { grid-column: 1 / -1; }

.card h3 {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 600;
    color: var(--gold);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--gold-border);
}

.card-body {
    font-size: 14px;
    line-height: 1.7;
    color: var(--white-muted);
}

.card-body a {
    color: var(--gold-light);
    text-decoration: none;
}

.card-body a:hover { text-decoration: underline; }

.news-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.news-item:last-child { border-bottom: none; }

.news-item .news-title {
    font-weight: 500;
    color: var(--white);
    margin-bottom: 4px;
}

.news-item .news-source {
    font-size: 12px;
    color: var(--white-dim);
}

.event-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.event-item .event-name { color: var(--white); font-weight: 500; }
.event-item .event-date { color: var(--gold); font-size: 12px; }
.event-item .event-location { color: var(--white-dim); font-size: 12px; }

/* PIPELINE STATS */
.pipeline-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--black-card);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
}

.stat-card.stat-a { border-left: 3px solid var(--gold); }
.stat-card.stat-b { border-left: 3px solid var(--blue); }
.stat-card.stat-c { border-left: 3px solid var(--white-dim); }

.stat-number {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    color: var(--white);
}

.stat-label {
    font-size: 12px;
    color: var(--white-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.pipeline-health, .recruit-list {
    background: var(--black-card);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    margin-bottom: 16px;
}

.pipeline-health h3, .recruit-list h3 {
    font-family: var(--font-display);
    font-size: 15px;
    color: var(--gold);
    margin-bottom: 12px;
}

.health-ok { color: var(--green); }
.health-warn { color: var(--gold); }
.health-error { color: var(--red); }

.recruit-row {
    display: grid;
    grid-template-columns: 40px 1fr 1fr 120px 80px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    align-items: center;
    font-size: 13px;
}

.recruit-row:last-child { border-bottom: none; }

.recruit-tier {
    font-weight: 700;
    font-size: 14px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.tier-a { background: var(--gold-muted); color: var(--gold); }
.tier-b { background: rgba(52,152,219,0.15); color: var(--blue); }
.tier-c { background: rgba(255,255,255,0.08); color: var(--white-dim); }

.recruit-name { font-weight: 500; color: var(--white); }
.recruit-company { color: var(--white-muted); }
.recruit-role { color: var(--white-dim); font-size: 12px; }
.recruit-date { color: var(--white-dim); font-size: 12px; }

/* TO-DO LIST */
.add-btn {
    padding: 8px 20px;
    background: var(--gold);
    color: var(--black);
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    transition: background 0.2s;
}

.add-btn:hover { background: var(--gold-light); }

.add-task-form {
    background: var(--black-card);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-lg);
    padding: 16px 20px;
    margin-bottom: 20px;
}

.add-task-form input[type="text"] {
    width: 100%;
    padding: 12px;
    background: var(--black);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 14px;
    font-family: var(--font-body);
    outline: none;
    margin-bottom: 12px;
}

.add-task-form input[type="text"]:focus { border-color: var(--gold); }

.task-form-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.task-form-actions label {
    font-size: 13px;
    color: var(--white-muted);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.save-btn {
    padding: 8px 20px;
    background: var(--gold);
    color: var(--black);
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-body);
}

.cancel-btn {
    padding: 8px 20px;
    background: transparent;
    border: 1px solid var(--gold-border);
    color: var(--white-dim);
    border-radius: var(--radius);
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font-body);
}

.task-section { margin-bottom: 24px; }

.task-section-title {
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--white-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.task-section-title.urgent-title { color: var(--red); }
.task-section-title.completed-title { color: var(--green); }

.task-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--black-card);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.task-item:hover { border-color: var(--gold-dark); }

.task-item.urgent { border-left: 3px solid var(--red); }

.task-item.completed {
    opacity: 0.5;
    border-color: rgba(255,255,255,0.05);
}

.task-item.completed .task-text { text-decoration: line-through; }

.task-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gold-border);
    border-radius: 4px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.task-checkbox.checked {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--black);
    font-size: 12px;
}

.task-text {
    flex: 1;
    font-size: 14px;
    color: var(--white);
}

.task-delete {
    opacity: 0;
    background: none;
    border: none;
    color: var(--red);
    cursor: pointer;
    font-size: 16px;
    padding: 4px;
    transition: opacity 0.2s;
}

.task-item:hover .task-delete { opacity: 0.6; }
.task-delete:hover { opacity: 1 !important; }

/* CHAT */
.chat-container {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 240px);
    background: var(--black-card);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

.chat-message {
    margin-bottom: 16px;
    display: flex;
}

.chat-message.user { justify-content: flex-end; }

.chat-bubble {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    font-size: 14px;
    line-height: 1.6;
}

.chat-message.assistant .chat-bubble {
    background: var(--black-soft);
    border: 1px solid var(--gold-border);
    color: var(--white-muted);
}

.chat-message.user .chat-bubble {
    background: var(--gold-muted);
    border: 1px solid var(--gold-border);
    color: var(--white);
}

.chat-input-area {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--gold-border);
    background: var(--black-soft);
}

#chat-input {
    flex: 1;
    padding: 12px;
    background: var(--black);
    border: 1px solid var(--gold-border);
    border-radius: var(--radius);
    color: var(--white);
    font-size: 14px;
    font-family: var(--font-body);
    resize: none;
    outline: none;
}

#chat-input:focus { border-color: var(--gold); }

.chat-send {
    padding: 12px 24px;
    background: var(--gold);
    color: var(--black);
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    align-self: flex-end;
    transition: background 0.2s;
}

.chat-send:hover { background: var(--gold-light); }

/* RATE TABLE */
.rate-table {
    width: 100%;
    border-collapse: collapse;
}

.rate-table th, .rate-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    font-size: 13px;
}

.rate-table th {
    color: var(--gold);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.rate-table td { color: var(--white-muted); }
.rate-table td:last-child { color: var(--white); font-weight: 500; }

/* LOADING */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gold-border);
    border-top-color: var(--gold);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* RESPONSIVE */
@media (max-width: 768px) {
    .header { padding: 12px 16px; }
    .content { padding: 16px; }
    .tab-bar { padding: 0 8px; }
    .tab { padding: 12px 12px; font-size: 12px; }
    .tab-label { display: none; }
    .tab-icon { font-size: 20px; }
    .briefing-grid { grid-template-columns: 1fr; }
    .pipeline-stats { grid-template-columns: repeat(2, 1fr); }
    .recruit-row { grid-template-columns: 30px 1fr 80px; }
    .recruit-company, .recruit-role { display: none; }
    .login-card { width: 90%; padding: 32px 24px; }
}
