/* TMRW Ops — shared styles */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    min-height: 100vh;
    background: #0a1f0a;
    color: #e2e8f0;
}

/* Nav */
.nav {
    border-bottom: 1px solid rgba(52, 211, 153, 0.15);
    background: rgba(10, 30, 20, 0.95);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 32px;
    height: 56px;
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-logo {
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-decoration: none;
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 50%, #ea580c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-logo-sub {
    font-weight: 400;
    font-size: 14px;
    opacity: 0.7;
}

.nav-links {
    display: flex;
    gap: 4px;
    flex: 1;
}

.nav-link {
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 14px;
    color: #a7c4a0;
    text-decoration: none;
    transition: all 0.15s;
}

.nav-link:hover {
    background: rgba(52, 211, 153, 0.08);
    color: #d1fae5;
}

.nav-link.active {
    background: rgba(52, 211, 153, 0.12);
    color: #34d399;
}

.nav-user {
    font-size: 13px;
    color: #6b8068;
}

/* Main content */
.main {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px;
}

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

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #d1fae5;
    margin-bottom: 24px;
}

.page-header .page-title {
    margin-bottom: 0;
}

/* Auth gate */
.center-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 32px;
    text-align: center;
}

.center-message h2 {
    font-size: 18px;
    color: #d1fae5;
    margin-bottom: 8px;
}

.center-message p {
    color: #7a9a78;
    font-size: 14px;
}

/* Sections */
.section {
    margin-bottom: 40px;
}

.section-header {
    margin-bottom: 12px;
}

.section-title {
    font-size: 15px;
    font-weight: 600;
    color: #d1fae5;
}

/* Inputs */
.input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.input {
    flex: 1;
    padding: 9px 14px;
    border: 1px solid rgba(52, 211, 153, 0.2);
    border-radius: 8px;
    background: rgba(15, 35, 25, 0.6);
    color: #d1fae5;
    font-size: 14px;
    outline: none;
    transition: border-color 0.15s;
}

.input:focus { border-color: #34d399; }
.input::placeholder { color: #6b8068; }

/* Buttons */
.btn {
    padding: 9px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

.btn-primary:hover { background: #047857; }
.btn-primary:disabled { background: #374a3c; cursor: not-allowed; }

.btn-secondary {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.2);
}

.btn-secondary:hover {
    background: rgba(52, 211, 153, 0.15);
    border-color: rgba(52, 211, 153, 0.3);
}

.btn-danger {
    background: none;
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.5);
}

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

/* Badge */
.badge {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(52, 211, 153, 0.12);
    color: #34d399;
    margin-left: 6px;
}

/* Tags */
.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    background: rgba(52, 211, 153, 0.1);
    color: #a7c4a0;
}

.tag-green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.tag-yellow { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.tag-blue { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }

/* Tables */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    text-align: left;
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 600;
    color: #6b8068;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(52, 211, 153, 0.15);
}

.table td {
    padding: 9px 14px;
    font-size: 14px;
    border-bottom: 1px solid rgba(52, 211, 153, 0.06);
}

.table tr:hover td {
    background: rgba(52, 211, 153, 0.03);
}

.mono {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 13px;
}

.muted { color: #6b8068; font-size: 13px; }

/* Stats bar */
.stats-bar {
    display: flex;
    gap: 16px;
}

.stat {
    font-size: 13px;
    color: #a7c4a0;
    padding: 4px 12px;
    background: rgba(52, 211, 153, 0.06);
    border-radius: 6px;
}

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

.dash-card {
    display: flex;
    gap: 16px;
    padding: 20px;
    border: 1px solid rgba(52, 211, 153, 0.12);
    border-radius: 12px;
    background: rgba(10, 30, 20, 0.5);
    text-decoration: none;
    color: inherit;
    transition: all 0.15s;
}

.dash-card:hover {
    border-color: rgba(52, 211, 153, 0.25);
    background: rgba(15, 40, 25, 0.5);
    transform: translateY(-1px);
}

.dash-card-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(52, 211, 153, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #34d399;
}

.dash-card-body h3 {
    font-size: 15px;
    font-weight: 600;
    color: #d1fae5;
    margin-bottom: 4px;
}

.dash-card-body p {
    font-size: 13px;
    color: #7a9a78;
}

.dash-stat {
    font-size: 13px;
    color: #34d399;
    margin-top: 8px;
}

/* Links */
.link {
    color: #34d399;
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
    color: #6ee7b7;
}

/* Loading & empty states */
.loading {
    text-align: center;
    padding: 40px;
    color: #6b8068;
}

.empty {
    text-align: center;
    padding: 24px;
    color: #6b8068;
    font-size: 14px;
}

.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(52, 211, 153, 0.2);
    border-top-color: #34d399;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
    vertical-align: middle;
}

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

/* Toast */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 1000;
    animation: slideIn 0.2s ease;
}

.toast.success {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.toast.error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #f87171;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}
