/* ============================================
   Stiefeld App Overview – Design System
   Light & Dark Mode, Glassmorphism, Modern UI
   Accent: Indigo #6366f1 / #818cf8
   ============================================ */

/* ── Custom Properties: Light Mode (default) ── */
:root,
[data-theme="light"] {
    --bg-primary: #f0f2f5;
    --bg-secondary: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.85);
    --bg-card-solid: #ffffff;
    --bg-input: rgba(0, 0, 0, 0.04);
    --bg-hover: rgba(99, 102, 241, 0.06);
    --bg-overlay: rgba(0, 0, 0, 0.3);

    --text-primary: #1a1d2e;
    --text-secondary: #5c6070;
    --text-muted: #9498ab;

    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-dim: rgba(99, 102, 241, 0.1);
    --accent-glow: rgba(99, 102, 241, 0.15);
    --accent-text: #ffffff;

    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    --border: rgba(0, 0, 0, 0.08);
    --border-accent: rgba(99, 102, 241, 0.2);

    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 8px 30px rgba(99, 102, 241, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.08);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --header-height: 64px;
    --footer-height: 36px;
    --content-max-width: 960px;

    --gradient-bg: linear-gradient(135deg, rgba(99, 102, 241, 0.03) 0%, rgba(168, 85, 247, 0.03) 100%);
    --gradient-accent: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

/* ── Custom Properties: Dark Mode ── */
[data-theme="dark"] {
    --bg-primary: #0c0f1a;
    --bg-secondary: #141829;
    --bg-card: rgba(22, 28, 50, 0.75);
    --bg-card-solid: #161c32;
    --bg-input: rgba(255, 255, 255, 0.06);
    --bg-hover: rgba(129, 140, 248, 0.08);
    --bg-overlay: rgba(0, 0, 0, 0.6);

    --text-primary: #eef0f6;
    --text-secondary: #8b90a8;
    --text-muted: #505470;

    --accent: #818cf8;
    --accent-hover: #6366f1;
    --accent-dim: rgba(129, 140, 248, 0.12);
    --accent-glow: rgba(129, 140, 248, 0.2);
    --accent-text: #0c0f1a;

    --success: #34d399;
    --danger: #f87171;
    --warning: #fbbf24;

    --border: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(129, 140, 248, 0.2);

    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
    --shadow-card-hover: 0 8px 40px rgba(129, 140, 248, 0.15), 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 50px rgba(129, 140, 248, 0.1);

    --gradient-bg: linear-gradient(135deg, rgba(129, 140, 248, 0.04) 0%, rgba(139, 92, 246, 0.04) 100%);
    --gradient-accent: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
}

/* ── Auto dark mode ── */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg-primary: #0c0f1a;
        --bg-secondary: #141829;
        --bg-card: rgba(22, 28, 50, 0.75);
        --bg-card-solid: #161c32;
        --bg-input: rgba(255, 255, 255, 0.06);
        --bg-hover: rgba(129, 140, 248, 0.08);
        --bg-overlay: rgba(0, 0, 0, 0.6);

        --text-primary: #eef0f6;
        --text-secondary: #8b90a8;
        --text-muted: #505470;

        --accent: #818cf8;
        --accent-hover: #6366f1;
        --accent-dim: rgba(129, 140, 248, 0.12);
        --accent-glow: rgba(129, 140, 248, 0.2);
        --accent-text: #0c0f1a;

        --success: #34d399;
        --danger: #f87171;
        --warning: #fbbf24;

        --border: rgba(255, 255, 255, 0.06);
        --border-accent: rgba(129, 140, 248, 0.2);

        --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
        --shadow-card-hover: 0 8px 40px rgba(129, 140, 248, 0.15), 0 4px 16px rgba(0, 0, 0, 0.3);
        --shadow-glow: 0 0 50px rgba(129, 140, 248, 0.1);

        --gradient-bg: linear-gradient(135deg, rgba(129, 140, 248, 0.04) 0%, rgba(139, 92, 246, 0.04) 100%);
        --gradient-accent: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
    }
}

/* ── Reset ── */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100dvh;
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ── Background Ambient Effect ── */
body::before {
    content: '';
    position: fixed;
    top: -30%;
    right: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

body::after {
    content: '';
    position: fixed;
    bottom: -20%;
    left: -15%;
    width: 50%;
    height: 50%;
    background: radial-gradient(ellipse, rgba(168, 85, 247, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

/* ── App Shell ── */
#app {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
    position: relative;
    z-index: 1;
}

/* ── Header ── */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
    transition: background-color 0.3s ease;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.header-logo {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-accent);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 1rem;
}

.header-logo svg {
    width: 20px;
    height: 20px;
}

.header-title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1.8px;
    text-transform: uppercase;
}

.header-title-accent {
    color: var(--accent);
}

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

/* ── Buttons ── */
.btn-icon {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--bg-hover);
    color: var(--accent);
    border-color: var(--border-accent);
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--gradient-accent);
    color: white;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    background: var(--bg-input);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--border-accent);
}

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

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.18);
}

.btn-primary svg,
.btn-secondary svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.78rem;
    border-radius: var(--radius-sm);
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

.btn-block {
    width: 100%;
}

/* ── Content ── */
.app-content {
    flex: 1;
    padding: calc(var(--header-height) + 24px) 20px calc(var(--footer-height) + 24px);
    max-width: var(--content-max-width);
    margin: 0 auto;
    width: 100%;
}

/* ── Dashboard Hero ── */
.dashboard-hero {
    text-align: center;
    padding: 32px 0 40px;
    animation: fadeInUp 0.5s ease;
}

.dashboard-hero h1 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    margin-bottom: 8px;
}

.dashboard-hero h1 .accent {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-hero p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 400px;
    margin: 0 auto;
}

/* ── App Grid ── */
.app-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    animation: fadeInUp 0.5s ease 0.1s both;
}

@media (min-width: 500px) {
    .app-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 800px) {
    .app-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ── App Card ── */
.app-card {
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.4s ease both;
}

.app-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-bg);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.app-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow-card-hover);
}

.app-card:hover::before {
    opacity: 1;
}

.app-card:active {
    transform: translateY(-2px);
}

/* Stagger animation for cards */
.app-card:nth-child(1) { animation-delay: 0.05s; }
.app-card:nth-child(2) { animation-delay: 0.1s; }
.app-card:nth-child(3) { animation-delay: 0.15s; }
.app-card:nth-child(4) { animation-delay: 0.2s; }
.app-card:nth-child(5) { animation-delay: 0.25s; }
.app-card:nth-child(6) { animation-delay: 0.3s; }
.app-card:nth-child(7) { animation-delay: 0.35s; }
.app-card:nth-child(8) { animation-delay: 0.4s; }
.app-card:nth-child(9) { animation-delay: 0.45s; }

.app-card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    object-fit: cover;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
    background: var(--bg-input);
}

.app-card-icon-fallback {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    color: white;
    position: relative;
    z-index: 1;
    background: var(--gradient-accent);
}

.app-card-title {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    position: relative;
    z-index: 1;
    line-height: 1.3;
}

.app-card-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    line-height: 1.45;
    position: relative;
    z-index: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.app-card-arrow {
    position: absolute;
    top: 16px;
    right: 16px;
    color: var(--text-muted);
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.3s ease;
    z-index: 1;
}

.app-card-arrow svg {
    width: 16px;
    height: 16px;
}

.app-card:hover .app-card-arrow {
    opacity: 1;
    transform: translateX(0);
    color: var(--accent);
}

/* ── Loading Skeleton ── */
.skeleton-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 500px) {
    .skeleton-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 800px) {
    .skeleton-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.skeleton-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.skeleton {
    background: linear-gradient(90deg, var(--bg-input) 25%, var(--bg-hover) 50%, var(--bg-input) 75%);
    background-size: 200% 100%;
    animation: skeleton 1.5s ease infinite;
    border-radius: var(--radius-sm);
}

.skeleton-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
}

.skeleton-title {
    height: 16px;
    width: 70%;
}

.skeleton-text {
    height: 12px;
    width: 90%;
}

/* ── Empty State ── */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 64px 20px;
    text-align: center;
    animation: fadeInUp 0.5s ease;
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    border-radius: var(--radius-lg);
    margin-bottom: 20px;
    color: var(--accent);
}

.empty-state-icon svg {
    width: 28px;
    height: 28px;
}

.empty-state h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ── Admin: Login ── */
.login-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100dvh - var(--footer-height) - var(--header-height));
    padding: 24px 20px;
}

.login-card {
    width: 100%;
    max-width: 380px;
    background: var(--bg-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    box-shadow: var(--shadow-card);
    animation: fadeInUp 0.5s ease;
}

.login-card h2 {
    font-size: 1.15rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 6px;
}

.login-card .login-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 28px;
}

/* ── Forms ── */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    padding: 11px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    outline: none;
}

.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-input::placeholder {
    color: var(--text-muted);
}

/* ── Admin Panel ── */
.admin-panel {
    animation: fadeInUp 0.4s ease;
}

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

.admin-header h2 {
    font-size: 1.15rem;
    font-weight: 700;
}

.admin-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.admin-section {
    margin-bottom: 32px;
}

.admin-section-title {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-section-title .badge {
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 0.6rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 700;
}

.admin-section-title svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ── Scan Info ── */
.scan-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.scan-info svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* ── Admin App List ── */
.admin-app-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-app-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    animation: fadeInUp 0.3s ease both;
}

.admin-app-item:hover {
    border-color: var(--border-accent);
}

.admin-app-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg-input);
}

.admin-app-icon-fallback {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    font-weight: 800;
    color: white;
    flex-shrink: 0;
    background: var(--gradient-accent);
}

.admin-app-info {
    flex: 1;
    min-width: 0;
}

.admin-app-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-app-folder {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-family: monospace;
}

.admin-app-url {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.admin-app-url .form-input {
    width: 220px;
    padding: 8px 12px;
    font-size: 0.8rem;
}

.admin-app-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.admin-app-status.active {
    background: var(--success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
}

.admin-app-status.inactive {
    background: var(--text-muted);
}

/* ── Admin: Password Section ── */
.password-section {
    background: var(--bg-card);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.password-section h3 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
}

/* ── Scan Info ── */
.scan-info {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.scan-info svg {
    width: 14px;
    height: 14px;
}

/* ── Toast ── */
.toast-container {
    position: fixed;
    bottom: calc(var(--footer-height) + 16px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 420px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 8px;
    animation: toastIn 0.3s ease;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.toast-success {
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.toast-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: var(--danger);
}

.toast-warning {
    background: rgba(245, 158, 11, 0.12);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: var(--warning);
}

/* ── Spinner ── */
.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-lg {
    width: 36px;
    height: 36px;
    border-width: 3px;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 0;
    gap: 16px;
}

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

/* ── Footer ── */
.app-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--footer-height);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    z-index: 100;
    transition: background-color 0.3s ease;
}

.app-footer #build-info {
    font-size: 0.6rem;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

/* ── Page transitions ── */
.page {
    display: none;
}

.page.active {
    display: block;
}

/* ── Responsive: Mobile adjustments ── */
@media (max-width: 499px) {
    .admin-app-item {
        flex-wrap: wrap;
    }

    .admin-app-url {
        width: 100%;
    }

    .admin-app-url .form-input {
        width: 100%;
    }

    .admin-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-actions {
        width: 100%;
    }

    .admin-actions .btn-primary,
    .admin-actions .btn-secondary {
        flex: 1;
    }
}

/* ── Desktop ── */
@media (min-width: 800px) {
    .dashboard-hero h1 {
        font-size: 2rem;
    }

    .app-card {
        padding: 28px;
    }

    .admin-app-url .form-input {
        width: 280px;
    }
}

/* ── Animations ── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes skeleton {
    to { background-position: -200% 0; }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ── Utilities ── */
.hidden { display: none !important; }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
