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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Tahoma', sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

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

.header h1 {
    font-size: 1.5rem;
    color: #1a1a2e;
}

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

.card {
    background: #fff;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card h2 {
    font-size: 1.2rem;
    margin-bottom: 16px;
    color: #1a1a2e;
    border-bottom: 2px solid #f0f2f5;
    padding-bottom: 10px;
}

.card-danger {
    border: 2px solid #dc3545;
}

.login-card {
    max-width: 400px;
    margin: 100px auto;
    text-align: center;
}

.login-card h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.login-card p {
    color: #666;
    margin-bottom: 20px;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    text-align: center;
    padding: 20px;
}

.stat-value {
    font-size: 2rem;
    font-weight: bold;
    color: #1a1a2e;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: #666;
}

.stat-card small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.8rem;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #444;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus {
    outline: none;
    border-color: #4a90d9;
}

.form-group small {
    display: block;
    color: #888;
    font-size: 0.8rem;
    margin-top: 4px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-family: inherit;
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary {
    background: #4a90d9;
    color: #fff;
}

.btn-success {
    background: #28a745;
    color: #fff;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
}

.btn-warning {
    background: #ffc107;
    color: #333;
}

.btn-full {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.alert {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

.stats-table td {
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
}

.stats-table td:last-child {
    text-align: left;
}

.code-block {
    background: #1a1a2e;
    color: #f8f9fa;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 12px 0;
    overflow-x: auto;
    direction: ltr;
    text-align: left;
}

.code-block code {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.hint {
    color: #888;
    font-size: 0.85rem;
    margin-top: 10px;
}

.card ol {
    padding-right: 20px;
    margin: 10px 0;
}

.card ol li {
    margin-bottom: 6px;
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    .header {
        flex-direction: column;
        text-align: center;
    }
    .dashboard {
        grid-template-columns: 1fr 1fr;
    }
    .btn-group {
        flex-direction: column;
    }
    .btn-group .btn {
        width: 100%;
    }
}
