* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    background: #f5f7fb;
    color: #1f2937;
}

a {
    text-decoration: none;
}

.app-shell {
    min-height: 100vh;
}

.topbar {
    background: #1e293b;
    color: #fff;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.12);
}

.topbar-inner {
    max-width: 1250px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-badge {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #ec4899;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
}

.brand-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.brand-subtitle {
    font-size: 12px;
    opacity: 0.8;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-chip {
    background: rgba(255,255,255,0.12);
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
}

.main-nav {
    max-width: 1250px;
    margin: 18px auto 0;
    padding: 0 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.main-nav a {
    background: #fff;
    color: #334155;
    border-radius: 999px;
    padding: 11px 16px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    font-weight: 600;
    font-size: 14px;
}

.page-wrap {
    max-width: 1250px;
    margin: 20px auto;
    padding: 0 20px 40px;
}

.card {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    padding: 22px;
    margin-bottom: 20px;
}

.page-title {
    margin: 0 0 8px;
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

.page-subtitle {
    margin: 0;
    color: #64748b;
    font-size: 14px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    font-weight: 700;
    cursor: pointer;
}

.btn-primary {
    background: #ec4899;
    color: #fff;
}

.btn-dark {
    background: #1e293b;
    color: #fff;
}

.btn-outline {
    background: #fff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
}

.btn-sm {
    padding: 9px 12px;
    font-size: 13px;
}

.grid {
    display: grid;
    gap: 18px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-card {
    background: linear-gradient(180deg, #ffffff 0%, #faf5ff 100%);
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    padding: 22px;
}

.stat-label {
    font-size: 13px;
    color: #64748b;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.quick-link {
    background: #fff;
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    padding: 20px;
    color: #0f172a;
}

.quick-link-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}

.quick-link-text {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
}

.alert {
    padding: 14px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
    font-weight: 600;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.alert-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field label {
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid #dbe2ea;
    border-radius: 14px;
    padding: 12px 14px;
    font-size: 14px;
    background: #fff;
}

.field textarea {
    min-height: 120px;
    resize: vertical;
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.table th {
    color: #475569;
    font-size: 13px;
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.badge-green {
    background: #dcfce7;
    color: #166534;
}

.badge-yellow {
    background: #fef9c3;
    color: #854d0e;
}

.badge-red {
    background: #fee2e2;
    color: #991b1b;
}

.badge-slate {
    background: #e2e8f0;
    color: #334155;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top right, rgba(236, 72, 153, 0.12), transparent 20%),
        #f8fafc;
}

.login-card {
    width: 100%;
    max-width: 460px;
    background: #fff;
    border-radius: 28px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
    padding: 28px;
}

.login-title {
    margin: 0 0 8px;
    font-size: 30px;
    color: #0f172a;
}

.login-text {
    margin: 0 0 24px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.5;
}

.login-demo {
    margin-top: 18px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 16px;
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
}

.empty-state {
    padding: 32px;
    text-align: center;
    color: #64748b;
}

@media (max-width: 980px) {
    .grid-2,
    .grid-3,
    .quick-links,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}