:root {
    --bg: #0b1020;
    --surface: #111934;
    --surface-2: #0e1530;
    --text: #e8ecf1;
    --muted: #a7afc1;
    --primary: #4f7cff;
    --primary-600: #3a68f6;
    --danger: #ff5e6a;
    --border: #223058;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: radial-gradient(1200px 800px at 10% 0%, #121d41 0%, #0b1020 40%, #080c18 100%);
    color: var(--text);
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

html {
    height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

.navbar {
    border-bottom: 1px solid var(--border);
    background: rgba(11, 16, 32, 0.6);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand {
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

main.container {
    padding: 32px 16px;
    flex: 1 0 auto;
}

.hero {
    text-align: center;
    margin: 64px 0;
}

.hero h1 {
    font-size: 40px;
    margin-bottom: 8px;
}

.hero p {
    color: var(--muted);
    margin-bottom: 24px;
}

.card {
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 0 0 1px rgba(79, 124, 255, 0.08), 0 20px 40px rgba(0, 0, 0, 0.35);
}

.card.error {
    border-color: rgba(255, 94, 106, 0.4);
    box-shadow: 0 0 0 1px rgba(255, 94, 106, 0.08), 0 20px 40px rgba(0, 0, 0, 0.35);
}

.card h2 {
    margin-top: 0;
}

.card p {
    color: var(--muted);
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.resource-card {
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 0 0 1px rgba(79, 124, 255, 0.08), 0 20px 40px rgba(0, 0, 0, 0.35);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    min-height: 180px;
}

.resource-card:hover:not(.resource-card-disabled) {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(79, 124, 255, 0.12), 0 24px 48px rgba(0, 0, 0, 0.4);
    border-color: rgba(79, 124, 255, 0.3);
}

.resource-card-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.resource-card-header {
    margin-bottom: 12px;
}

.resource-card-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
}

.resource-card-description {
    color: var(--muted);
    margin: 0 0 auto 0;
    line-height: 1.5;
    flex: 1;
}

.resource-card-actions {
    margin-top: 20px;
    display: flex;
    justify-content: flex-start;
}

.btn-resource {
    min-width: 100px;
    justify-content: center;
    font-weight: 500;
}

.btn-resource:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.muted-card {
    opacity: 0.75;
}

.tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 0 24px 0;
}

.tile {
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-2) 100%);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 0 0 1px rgba(79, 124, 255, 0.06), 0 10px 24px rgba(0, 0, 0, 0.25);
}

.tile h3 {
    margin: 0 0 8px 0;
}

.tile p {
    color: var(--muted);
    margin-top: 4px;
    margin-bottom: 12px;
}

.tile.disabled {
    opacity: 0.6;
}

.controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.controls.vertical {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    max-width: 640px;
}

.controls label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--muted);
    font-size: 14px;
}

.controls select {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    min-width: 240px;
    width: 100%;
}

.helper-text {
    font-size: 12px;
    color: var(--muted);
    opacity: 0.8;
    margin-top: 4px;
}

.muted {
    color: var(--muted);
}

.actions-row {
    display: flex;
    gap: 10px;
}

@media (max-width: 800px) {
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .resource-card {
        min-height: auto;
    }

    .tiles {
        grid-template-columns: 1fr;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    border: 1px solid var(--border);
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
    transition: background 0.15s ease, border-color 0.15s ease, transform 0.02s ease;
}

.btn:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: #2b3a6e;
}

.btn:active {
    transform: translateY(1px);
}

.btn.primary {
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-600) 100%);
    border-color: rgba(44, 89, 240, 0.6);
}

.btn.primary:hover {
    border-color: rgba(44, 89, 240, 0.9);
}

.footer {
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 14px;
    margin-top: auto;
    padding: 16px 0;
    background: rgba(11, 16, 32, 0.6);
    backdrop-filter: blur(8px);
}