/* ═══════════════════════════════════════════════════════════
   AIKONIC — Clean Modern Design System
   ═══════════════════════════════════════════════════════════ */

:root {
    --bg: #f7f7f8;
    --panel: #ffffff;
    --soft: #f2f3f5;
    --line: #e4e6ea;
    --text: #22252b;
    --muted: #8a909b;
    --blue: #3a74f7;
    --green: #6cc17a;
    --red: #e15b64;
    --orange: #f3a25f;
    --radius: 12px;
}

/* Reset & Base */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.35;
}

/* Auth */
.auth-container { display: flex; justify-content: center; align-items: center; min-height: 80vh; }
.auth-card {
    background: var(--panel);
    border-radius: var(--radius);
    border: 1px solid var(--line);
    padding: 2.5rem;
    width: 400px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.06);
}
.auth-card h2 { margin-bottom: 1.5rem; text-align: center; color: var(--text); font-weight: 600; letter-spacing: -0.02em; }
.auth-link { text-align: center; margin-top: 1rem; font-size: 0.9rem; }
.auth-link a { color: var(--blue); text-decoration: none; }
.auth-link a:hover { color: #2d63d8; text-decoration: underline; }

/* Forms */
.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.3rem; font-weight: 500; font-size: 13px; color: #3e4551; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 0.6rem 0.75rem; border: 1px solid #dde2ea; border-radius: 6px;
    font-size: 13px; font-family: 'Inter', sans-serif; transition: border-color 0.2s; background: #fff; color: #3e4551;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(58,116,247,0.12); }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }

/* Buttons */
.btn { padding: 0 14px; height: 34px; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 600; font-family: 'Inter', sans-serif; transition: all 0.15s; display: inline-flex; align-items: center; justify-content: center; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: #2d63d8; }
.btn-secondary { background: transparent; color: var(--text); border: 1px solid #dde2ea; }
.btn-secondary:hover { background: var(--soft); }

/* Messages */
.message { padding: 0.8rem; border-radius: 8px; margin-top: 1rem; font-size: 13px; border: 1px solid; }
.message.success { background: #e7f6eb; color: #2a7a40; border-color: #b8e4c2; }
.message.error { background: #fde8ea; color: #b5343c; border-color: #f7c5c8; }

/* Dashboard */
.dashboard-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.dashboard-header h1 { font-size: 2.375rem; font-weight: 700; letter-spacing: -0.2px; margin: 0; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.stat-card { background: var(--panel); border-radius: var(--radius); border: 1px solid var(--line); padding: 12px 14px; }
.stat-card h3 { font-size: 2.25rem; color: var(--text); font-family: 'JetBrains Mono', monospace; font-weight: 600; letter-spacing: -0.4px; line-height: 1; }
.stat-card p { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.9px; font-weight: 600; margin-top: 4px; }

/* Section */
.section { margin-bottom: 12px; }
.section h2 { margin-bottom: 10px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.8px; color: #626a76; font-weight: 700; }

/* Campaign Cards */
.campaign-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.campaign-card { background: var(--panel); border-radius: var(--radius); border: 1px solid var(--line); padding: 12px 14px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.campaign-card:hover { border-color: var(--blue); box-shadow: 0 2px 8px rgb(58 116 247 / 0.08); }
.campaign-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.campaign-header h3 { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.2px; }
.campaign-brand { color: var(--muted); font-size: 12px; margin-bottom: 0.8rem; }
.campaign-meta { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-planning { background: var(--soft); color: #4d5563; }
.badge-outreach { background: #fff2e7; color: #f5a66a; }
.badge-cooperation { background: #eee9ff; color: #7866db; }
.badge-contract { background: #e7f6eb; color: #4ba66a; }
.badge-brief { background: #e9f0ff; color: #4e78f7; }
.badge-review { background: #fde8ea; color: #e15b64; }
.badge-launch { background: #e7f7ee; color: #3a8a55; }
.badge-data_collection { background: #fff4d8; color: #d09b3f; }
.badge-completed { background: var(--blue); color: #fff; }

/* Chat */
.chat-container { background: var(--panel); border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.chat-messages { height: 400px; overflow-y: auto; padding: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.chat-msg { padding: 9px 10px; border-radius: 6px; max-width: 80%; font-size: 13px; line-height: 1.45; white-space: pre-wrap; border: 1px solid #ebedf2; }
.chat-msg.user { background: #fff; color: var(--text); align-self: flex-end; }
.chat-msg.agent { background: #f4f6f9; color: var(--text); align-self: flex-start; }
.chat-input-area { display: flex; gap: 8px; padding: 1rem; border-top: 1px solid var(--line); }
.chat-input-area select { width: 200px; padding: 0.5rem; border: 1px solid #dde2ea; border-radius: 6px; font-size: 13px; }
.chat-input-area input { flex: 1; padding: 0.5rem 0.75rem; border: 1px solid #dde2ea; border-radius: 6px; font-size: 13px; }

/* Modal */
.modal { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(34,37,43,0.45); justify-content: center; align-items: center; z-index: 1000; }
.modal-content { background: var(--panel); border-radius: var(--radius); border: 1px solid var(--line); padding: 2rem; width: 550px; max-height: 90vh; overflow-y: auto; position: relative; box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.12); }
.modal-close { position: absolute; top: 1rem; right: 1rem; font-size: 1.5rem; cursor: pointer; color: var(--muted); }

/* Empty State */
.empty-state { text-align: center; color: var(--muted); padding: 2rem; }

/* Responsive */
@media (max-width: 1080px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .campaign-list { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .chat-input-area { flex-wrap: wrap; }
    .chat-input-area select { width: 100%; }
}
