/* ================================================================
   Airlines Team Dashboard – team.css
   NYU color palette · Consistent with admin_dashboard/static/admin.css
   ================================================================ */

/* ── Reset & Base ──────────────────────────────────────────────── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(180deg, #F4F0FA 0%, #ECE5F7 100%);
    color: #222;
}

/* ── Header ────────────────────────────────────────────────────── */
.header {
    height: 120px;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: #F4F0FA;
}

.header-logo {
    position: absolute;
    left: 24px;
    max-width: 240px;
    max-height: 100px;
    object-fit: contain;
}

.header-center {
    text-align: center;
}

.header-title {
    font-size: 22px;
    font-weight: 600;
    color: #57068C;
    line-height: 1.3;
}

.header-subtitle {
    font-size: 13px;
    color: #444;
    line-height: 1.3;
}

.header-right {
    position: absolute;
    right: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-user {
    font-size: 13px;
    font-weight: 500;
    color: #57068C;
}

/* ── Banner (flash messages) ───────────────────────────────────── */
.banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}

.banner-success {
    background: #D4EDDA;
    color: #155724;
    border-bottom: 2px solid #28A745;
}

.banner-error {
    background: #F8D7DA;
    color: #721C24;
    border-bottom: 2px solid #DC3545;
}

.banner-close {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: inherit;
    padding: 0 4px;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Main Grid ─────────────────────────────────────────────────── */
.main-grid {
    display: flex;
    gap: 20px;
    padding: 16px 24px;
    min-height: calc(100vh - 120px - 40px);
}

.panel-left {
    width: 340px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-right {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Cards ─────────────────────────────────────────────────────── */
.card {
    background: #FFFFFF;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: #57068C;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-subtitle {
    font-size: 12px;
    font-weight: 400;
    color: #666;
}

/* ── Status Panel ──────────────────────────────────────────────── */
.status-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px 12px;
    font-size: 13px;
}

.status-label {
    color: #666;
    font-weight: 500;
}

.status-value {
    color: #222;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-running  { background: #D4EDDA; color: #155724; }
.badge-ended    { background: #F8D7DA; color: #721C24; }
.badge-created  { background: #CCE5FF; color: #004085; }
.badge-default  { background: #E2E3E5; color: #383D41; }

/* ── Info message ──────────────────────────────────────────────── */
.info-msg {
    font-size: 13px;
    color: #666;
    font-style: italic;
    padding: 8px 0;
}

/* ── Decision Form ─────────────────────────────────────────────── */
.decision-form {
    margin: 0;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.form-row label {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
    min-width: 110px;
    font-weight: 500;
}

.form-input {
    flex: 1;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #CCC;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    color: #222;
}

.form-input:focus {
    outline: none;
    border-color: #57068C;
    box-shadow: 0 0 0 2px rgba(87, 6, 140, 0.15);
}

.form-input-short {
    max-width: 80px;
    flex: 0 0 80px;
}

.form-hint {
    font-size: 11px;
    color: #999;
    white-space: nowrap;
}

.form-buttons {
    margin-top: 12px;
}

.action-form {
    margin: 0;
}

.action-divider {
    height: 1px;
    background: #EEE;
    margin: 10px 0;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    width: 100%;
    height: 36px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
    font-family: inherit;
}

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

.btn-primary {
    background: #57068C;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #7A1FA2;
}

.btn-danger {
    background: #DC3545;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #C82333;
}

.btn-warning {
    background: #E67E22;
    color: white;
}

.btn-warning:hover:not(:disabled) {
    background: #D35400;
}

.btn-small {
    width: auto;
    height: 28px;
    padding: 0 12px;
    font-size: 12px;
}

.btn-outline {
    background: transparent;
    color: #57068C;
    border: 1px solid #57068C;
}

.btn-outline:hover:not(:disabled) {
    background: #57068C;
    color: white;
}

.btn-full {
    width: 100%;
    height: 38px;
    font-size: 14px;
    margin-top: 8px;
}

/* ── Metrics Grid (team performance) ──────────────────────────── */
.metrics-header {
    font-size: 13px;
    font-weight: 600;
    color: #57068C;
    margin-bottom: 10px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 8px;
}

.metric {
    text-align: center;
    padding: 10px 4px;
    background: #F9F6FD;
    border-radius: 8px;
    border: 1px solid #EDE5F5;
}

.metric-value {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.metric-label {
    font-size: 11px;
    color: #888;
    font-weight: 500;
}

.metric-positive {
    color: #155724;
}

.metric-negative {
    color: #DC3545;
}

/* ── Table ─────────────────────────────────────────────────────── */
.table-wrap {
    overflow: auto;
}

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

.data-table thead tr {
    background: #57068C;
    height: 34px;
}

.data-table thead th {
    color: white;
    font-size: 12px;
    font-weight: 600;
    text-align: left;
    padding: 0 10px;
    white-space: nowrap;
}

.data-table tbody tr {
    height: 32px;
}

.data-table tbody tr:nth-child(even) {
    background: #F7F4FB;
}

.data-table tbody tr:hover {
    background: #EDE5F5;
}

.data-table tbody td {
    font-size: 12px;
    padding: 0 10px;
    white-space: nowrap;
}

/* ── Login Page ────────────────────────────────────────────────── */
.login-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.login-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    background: #FFFFFF;
    border-radius: 12px;
    padding: 32px 36px;
    box-shadow: 0 4px 16px rgba(87, 6, 140, 0.12);
    width: 100%;
    max-width: 380px;
}

.login-card-title {
    font-size: 20px;
    font-weight: 600;
    color: #57068C;
    text-align: center;
    margin-bottom: 20px;
}

.login-form .form-row {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    margin-bottom: 14px;
}

.login-form .form-row label {
    font-size: 13px;
    min-width: 0;
}

.login-form .form-input {
    height: 38px;
    font-size: 14px;
    padding: 0 12px;
}

/* ── Footer ────────────────────────────────────────────────────── */
.footer {
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666666;
}
