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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #0f1117;
    color: #e4e4e7;
    line-height: 1.5;
}

/* Login */
.login-container {
    max-width: 360px;
    margin: 120px auto;
    padding: 40px;
    background: #1a1b23;
    border-radius: 12px;
    border: 1px solid #2a2b35;
}

.login-container h1 {
    font-size: 1.5rem;
    margin-bottom: 2px;
}

.subtitle {
    color: #71717a;
    font-size: 0.875rem;
    margin-bottom: 24px;
}

.error {
    background: #3b1219;
    color: #fca5a5;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.875rem;
    margin-bottom: 16px;
}

label {
    display: block;
    font-size: 0.8rem;
    color: #a1a1aa;
    margin-bottom: 4px;
    margin-top: 12px;
}

input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    background: #0f1117;
    border: 1px solid #2a2b35;
    border-radius: 8px;
    color: #e4e4e7;
    font-size: 0.95rem;
}

input:focus {
    outline: none;
    border-color: #3b82f6;
}

button[type="submit"] {
    width: 100%;
    margin-top: 20px;
    padding: 10px;
    background: #3b82f6;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
}

button[type="submit"]:hover {
    background: #2563eb;
}

/* Dashboard */
.dashboard {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

header h1 {
    font-size: 1.5rem;
}

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

.btn-share {
    background: transparent;
    color: #3b82f6;
    border: 1px solid #3b82f6;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-share:hover {
    background: rgba(59, 130, 246, 0.1);
}

.btn-logout {
    background: transparent;
    color: #71717a;
    border: 1px solid #2a2b35;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
}

.btn-logout:hover {
    color: #e4e4e7;
    border-color: #3f3f46;
}

.last-sync {
    color: #71717a;
    font-size: 0.8rem;
    margin-bottom: 24px;
}

/* Cards */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 40px;
}

.card {
    background: #1a1b23;
    border: 1px solid #2a2b35;
    border-radius: 10px;
    padding: 18px;
}

.card h3 {
    font-size: 0.75rem;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.card .value {
    font-size: 1.75rem;
    font-weight: 600;
}

.card .unit {
    font-size: 0.85rem;
    color: #71717a;
    font-weight: 400;
}

.card .detail {
    font-size: 0.8rem;
    color: #a1a1aa;
    margin-top: 4px;
}

/* Progress bar */
.progress-bar {
    height: 6px;
    background: #2a2b35;
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: #3b82f6;
    border-radius: 3px;
}

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

.chart-card {
    background: #1a1b23;
    border: 1px solid #2a2b35;
    border-radius: 10px;
    padding: 18px;
    height: 280px;
}

.chart-card h3 {
    font-size: 0.75rem;
    color: #71717a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 12px;
}

.chart-card canvas {
    max-height: 220px;
}

@media (max-width: 640px) {
    .charts {
        grid-template-columns: 1fr;
    }
}

/* Table */
h2 {
    font-size: 1rem;
    margin-bottom: 12px;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

th {
    text-align: left;
    color: #71717a;
    font-weight: 500;
    padding: 8px 12px;
    border-bottom: 1px solid #2a2b35;
}

td {
    padding: 8px 12px;
    border-bottom: 1px solid #1a1b23;
}

tr:hover td {
    background: #1a1b23;
}

/* Empty state */
.empty {
    text-align: center;
    padding: 80px 20px;
    color: #71717a;
}

.empty p:first-child {
    font-size: 1.1rem;
    color: #a1a1aa;
    margin-bottom: 8px;
}
