@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

html {
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #f3f4f6;
    color: #334155;
    line-height: 1.55;
}

main {
    font-size: 0.9375rem;
    color: #334155;
}

main h1 {
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #0f172a;
}

main h2 {
    font-size: 1.125rem;
    line-height: 1.35;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #0f172a;
}

main h3 {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 600;
    color: #1e293b;
}

main p,
main li,
main td,
main th,
main label,
main input,
main select,
main textarea,
main button,
main a {
    font-size: 0.9375rem;
}

main table th {
    font-weight: 600;
}

main table.min-w-full thead th,
main table.orders-compact thead th {
    padding: 0.9rem 1rem;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    color: #64748b;
    background: #f8fafc;
    text-transform: uppercase;
}

main table.min-w-full tbody td,
main table.orders-compact tbody td {
    padding: 0.95rem 1rem;
    vertical-align: top;
}

main input,
main select,
main textarea {
    min-height: 42px;
}

main textarea {
    min-height: 96px;
}

.page-section-card {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.page-muted-text {
    color: #64748b;
}

.page-header-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.page-action-cluster {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0.55rem 0.7rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 0.9rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.page-filter-panel {
    padding: 1rem 1.1rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    margin-bottom: 1.5rem;
}

.page-filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.9rem 1rem;
    align-items: end;
}

.page-filter-grid .field-span-2 {
    grid-column: span 2;
}

.page-filter-grid .field-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}

.page-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    padding-bottom: 0.25rem;
}

.page-tab-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0.65rem 1rem;
    border-radius: 0.85rem;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #475569;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.page-tab-pill.is-active,
.page-tab-pill[aria-current="page"] {
    background: #16233f;
    border-color: #16233f;
    color: #ffffff;
}

.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger,
.btn-warning,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 42px;
    padding: 0.7rem 1rem;
    border-radius: 0.7rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    transition: all 0.2s ease;
}

.btn-primary { background: #16233f; color: #fff; border: 1px solid #16233f; }
.btn-primary:hover { background: #1d2d50; }
.btn-secondary { background: #f8fafc; color: #334155; border: 1px solid #cbd5e1; }
.btn-secondary:hover { background: #f1f5f9; }
.btn-success { background: #16a34a; color: #fff; border: 1px solid #16a34a; }
.btn-success:hover { background: #15803d; }
.btn-danger { background: #dc2626; color: #fff; border: 1px solid #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-warning { background: #ea580c; color: #fff; border: 1px solid #ea580c; }
.btn-warning:hover { background: #c2410c; }
.btn-outline { background: #fff; color: #475569; border: 1px solid #cbd5e1; }
.btn-outline:hover { background: #f8fafc; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.stat-card {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #ffffff;
    padding: 1.1rem 1.15rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.section-card {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
}

.section-card-header {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid #e2e8f0;
    background: #ffffff;
}

.section-card-body {
    padding: 1.1rem 1.15rem;
}

.form-shell {
    max-width: 72rem;
}

.form-grid-standard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.1rem;
}

.form-span-full {
    grid-column: 1 / -1;
}

.settings-tab-shell {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.settings-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.85rem 1rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.settings-tab-link {
    min-height: 42px;
    padding: 0.7rem 1rem;
    border-bottom: 2px solid transparent;
    color: #64748b;
    font-size: 0.875rem;
    font-weight: 600;
}

.settings-tab-link.is-active {
    color: #16233f;
    border-color: #16233f;
}

.notice-success,
.notice-error,
.notice-info {
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.notice-success { background: #ecfdf5; border-color: #a7f3d0; color: #166534; }
.notice-error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.notice-info { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }

@media (max-width: 768px) {
    .page-filter-grid .field-span-2 {
        grid-column: auto;
    }
}

.glass-effect {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
}
