/* Newtown Analytics — Clio Dashboards default stylesheet */

body {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    background-color: #f5f5f5;
    color: #1a1a2e;
}

h1, h2, h3 {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
}

.dash-dropdown .Select-control {
    border-color: #0f3460;
}

a { color: #0f3460; }
a:hover { color: #e94560; }

/* Chart cards */
.chart-card {
    background: #ffffff;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(26, 26, 46, 0.08);
}

.chart-card h3 {
    margin: 0 0 12px 0;
    font-size: 1rem;
    color: #1a1a2e;
}

/* Download buttons */
.download-btn {
    display: inline-block;
    margin-top: 8px;
    margin-right: 8px;
    padding: 5px 12px;
    background: #f5f5f5;
    color: #0f3460;
    border: 1px solid #0f3460;
    border-radius: 4px;
    font-size: 0.78rem;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, color 0.15s;
}

.download-btn:hover {
    background: #0f3460;
    color: #ffffff;
}

.download-btn-full {
    border-color: #e94560;
    color: #e94560;
}

.download-btn-full:hover {
    background: #e94560;
    color: #ffffff;
}

/* KPI row */
.kpi-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.kpi-card {
    flex: 1;
    min-width: 160px;
    background: #ffffff;
    border-radius: 6px;
    padding: 16px 20px;
    box-shadow: 0 1px 4px rgba(26, 26, 46, 0.08);
}

/* Dashboard description */
.dashboard-description {
    color: #555;
    font-size: 0.9rem;
    margin: 0 24px 16px 24px;
}

/* 404 page */
.not-found {
    text-align: center;
    padding: 80px 24px;
    color: #888;
}

.not-found h2 {
    font-size: 2rem;
    color: #1a1a2e;
    margin-bottom: 8px;
}

/* DataTable in flex layout fix */
.table-wrapper {
    overflow-x: auto;
    min-width: 0;
}

/* Dashboard index */
.dashboard-index-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.dashboard-index-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 4px rgba(26, 26, 46, 0.06);
    transition: box-shadow 0.15s, border-color 0.15s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 110px;
}

.dashboard-index-card:hover {
    box-shadow: 0 4px 12px rgba(26, 26, 46, 0.12);
    border-color: #0f3460;
}

/* Truncation warning */
.truncation-warning {
    font-size: 0.78rem;
    color: #e94560;
    margin-top: 4px;
}

/* ── Admin edit panel ──────────────────────────────────────────────────── */

.admin-panel {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.admin-panel-btn {
    background: #e94560;
    color: #ffffff;
    border: none;
    border-radius: 24px;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(233, 69, 96, 0.35);
    transition: background 0.15s, box-shadow 0.15s, transform 0.1s;
}

.admin-panel-btn:hover {
    background: #c62368;
    box-shadow: 0 6px 18px rgba(233, 69, 96, 0.45);
    transform: translateY(-1px);
}

.admin-panel-content {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 16px;
    width: 340px;
    box-shadow: 0 8px 32px rgba(26, 26, 46, 0.14);
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* hidden by default */
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: max-height 0.25s ease, opacity 0.2s ease, transform 0.2s ease;
}

.admin-panel-content.open {
    max-height: 340px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.admin-panel-textarea {
    width: 100%;
    min-height: 90px;
    resize: vertical;
    border: 1px solid #d0d0d0;
    border-radius: 6px;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 0.82rem;
    color: #1a1a2e;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
}

.admin-panel-textarea:focus {
    border-color: #0f3460;
}

.admin-panel-send-btn {
    align-self: flex-end;
    background: #0f3460;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 7px 18px;
    font-size: 0.82rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.admin-panel-send-btn:hover {
    background: #16213e;
}

.admin-panel-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.admin-panel-status {
    font-size: 0.78rem;
    color: #888;
    min-height: 16px;
}
