/* ==============================================
   Transformwerk Messe Dashboard
   Design: Inter + Teal (matching transformwerk.digital)
   ============================================== */

:root {
    /* Brand Colors — from transformwerk.digital */
    --teal-50: #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f2e4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;

    /* Neutrals */
    --navy: hsl(222.2, 47.4%, 11.2%);
    --navy-light: hsl(222, 20%, 30%);
    --text: hsl(222.2, 84%, 4.9%);
    --text-muted: hsl(215, 16%, 47%);
    --bg: hsl(210, 40%, 98%);
    --white: #ffffff;
    --border: hsl(214, 32%, 91%);
    --border-light: hsl(210, 40%, 96%);

    /* Semantic */
    --red: #ef4444;
    --red-light: #fef2f2;
    --blue: #3b82f6;
    --blue-light: #eff6ff;
    --amber: #f59e0b;

    /* Spacing */
    --radius: 12px;
    --radius-sm: 8px;
}

* {
    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);
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
.header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 18px;
    color: var(--navy);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
    color: white;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.logo-light {
    font-weight: 400;
    color: var(--text-muted);
}

.messe-selector {
    display: flex;
    align-items: center;
    gap: 8px;
}

.messe-selector label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}

.messe-selector select {
    font-family: inherit;
    font-size: 14px;
    padding: 8px 32px 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.messe-selector select:focus {
    outline: none;
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

/* Main */
.main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px;
}

/* Loading */
.loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 0;
    color: var(--text-muted);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--teal-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

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

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 24px;
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-state h2 {
    color: var(--navy);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-muted);
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

/* accent variant removed — uniform card style */

.kpi-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.2;
}

/* accent value color removed */

.kpi-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Cards */
.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

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

.card h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: var(--teal-100);
    color: var(--teal-700);
}

.badge.red {
    background: var(--red-light);
    color: var(--red);
}

.badge.blue {
    background: var(--blue-light);
    color: var(--blue);
}

/* Charts */
.charts-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.chart-card {
    margin-bottom: 0;
}

.chart-card h3 {
    margin-bottom: 16px;
}

.chart-container {
    position: relative;
    height: 260px;
}

/* Tables */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    padding: 8px 12px;
    border-bottom: 2px solid var(--border);
}

td {
    padding: 12px;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    vertical-align: top;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: var(--teal-50);
}

/* Two Column */
.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.two-col .card {
    margin-bottom: 0;
}

/* Insight List */
.insight-list {
    list-style: none;
}

.insight-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 14px;
    line-height: 1.5;
}

.insight-list li:last-child {
    border-bottom: none;
}

.insight-list .insight-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    margin-right: 8px;
    text-transform: uppercase;
}

.insight-tag.pain {
    background: var(--red-light);
    color: var(--red);
}

.insight-tag.trend {
    background: var(--blue-light);
    color: var(--blue);
}

.insight-tag.idee {
    background: #fefce8;
    color: var(--amber);
}

/* Zitate */
.zitate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.zitat-card {
    background: var(--teal-50);
    border-left: 4px solid var(--teal-500);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 16px 20px;
    font-style: italic;
    font-size: 14px;
    line-height: 1.6;
    color: var(--navy);
}

.zitat-source {
    font-style: normal;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Reports */
.report-intro {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.report-intro code {
    background: var(--teal-50);
    color: var(--teal-700);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

.reports-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.report-card {
    text-align: center;
    padding: 24px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all 0.15s;
}

.report-card:hover {
    border-color: var(--teal-400);
    background: var(--teal-50);
}

.report-card.available {
    border-color: var(--teal-200);
}

.report-icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.report-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--navy);
    margin-bottom: 4px;
}

.report-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

/* Buttons */
.btn {
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-sm {
    font-size: 13px;
    padding: 6px 12px;
}

.btn:not(:disabled) {
    background: var(--teal-500);
    color: white;
}

.btn:not(:disabled):hover {
    background: var(--teal-600);
}

.btn:disabled {
    background: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}

.btn-outline {
    background: var(--white) !important;
    color: var(--teal-700) !important;
    border: 1px solid var(--teal-500);
}

.btn-outline:hover {
    background: var(--teal-50) !important;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.15);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--navy);
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-close {
    width: 36px;
    height: 36px;
    border: none;
    background: none;
    font-size: 24px;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-close:hover {
    background: var(--border-light);
    color: var(--text);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    font-size: 14px;
    line-height: 1.8;
}

.modal-body h1 { font-size: 22px; margin: 24px 0 12px; color: var(--navy); }
.modal-body h2 { font-size: 18px; margin: 20px 0 10px; color: var(--navy); border-bottom: 1px solid var(--border-light); padding-bottom: 6px; }
.modal-body h3 { font-size: 15px; margin: 16px 0 8px; color: var(--teal-700); }
.modal-body p { margin-bottom: 10px; }
.modal-body ul, .modal-body ol { margin: 8px 0 8px 20px; }
.modal-body li { margin-bottom: 4px; }
.modal-body table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.modal-body th, .modal-body td { padding: 8px 10px; border: 1px solid var(--border); text-align: left; }
.modal-body th { background: var(--teal-50); font-weight: 600; }
.modal-body blockquote { border-left: 3px solid var(--teal-500); padding: 8px 16px; margin: 12px 0; background: var(--teal-50); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; }
.modal-body code { background: var(--teal-50); padding: 1px 5px; border-radius: 3px; font-size: 13px; }
.modal-body hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }
.modal-body input[type="checkbox"] { margin-right: 6px; }

/* Footer */
.footer {
    text-align: center;
    padding: 24px;
    color: var(--text-muted);
    font-size: 13px;
    border-top: 1px solid var(--border);
    margin-top: 40px;
}

/* Login */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}

.login-box {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    width: 100%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.login-box h2 {
    color: var(--navy);
    margin-bottom: 4px;
}

.login-input {
    font-family: inherit;
    font-size: 14px;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
}

.login-input:focus {
    outline: none;
    border-color: var(--teal-500);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner { flex-direction: column; align-items: flex-start; }
    .charts-row { grid-template-columns: 1fr; }
    .two-col { grid-template-columns: 1fr; }
    .reports-grid { grid-template-columns: 1fr; }
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .modal-content { max-height: 95vh; }
}
