:root {
    --bg-dark: #090d16;
    --card-bg: rgba(18, 26, 43, 0.85);
    --border-color: rgba(56, 189, 248, 0.2);
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --accent-cyan: #38bdf8;
    --accent-green: #4ade80;
    --accent-red: #f87171;
    --accent-yellow: #fbbf24;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    padding: 20px;
}

.app-container {
    max-width: 1280px;
    margin: 0 auto;
}

.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo-icon {
    font-size: 2.5rem;
}

.logo-area h1 {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, #38bdf8, #818cf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.header-badges {
    display: flex;
    gap: 10px;
}

.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid var(--border-color);
}

.badge-live { background-color: rgba(74, 222, 128, 0.1); color: var(--accent-green); }
.badge-track { background-color: rgba(56, 189, 248, 0.1); color: var(--accent-cyan); }
.badge-darkfactory { background-color: rgba(251, 191, 36, 0.1); color: var(--accent-yellow); }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 20px;
}

.card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    backdrop-filter: blur(10px);
}

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

.card-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
}

.status-indicator {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-family: 'JetBrains Mono', monospace;
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.res-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.res-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.res-title {
    font-weight: 600;
    font-size: 0.95rem;
}

.res-type {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.res-status-tag {
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.tag-available { background-color: rgba(74, 222, 128, 0.2); color: var(--accent-green); }
.tag-reserved { background-color: rgba(248, 113, 113, 0.2); color: var(--accent-red); }

.btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary { background: #0284c7; color: white; }
.btn-primary:hover { background: #0369a1; }
.btn-secondary { background: #334155; color: white; }

.form-control {
    width: 100%;
    padding: 10px;
    border-radius: 6px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    margin-top: 5px;
}

.balance-display {
    background: rgba(15, 23, 42, 0.9);
    padding: 20px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--accent-cyan);
}

.balance-value {
    font-size: 1.8rem;
    font-family: 'JetBrains Mono', monospace;
    color: var(--accent-green);
    font-weight: 700;
}

.ledger-list {
    list-style: none;
    margin-top: 10px;
    max-height: 250px;
    overflow-y: auto;
}

.ledger-item {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay.hidden { display: none; }

.modal-content {
    background: #1e293b;
    padding: 25px;
    border-radius: 10px;
    width: 400px;
    border: 1px solid var(--accent-cyan);
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
