*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f3f4f6;
    color: #111827;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header */

.site-header {
    background: #111827;
    color: #f9fafb;
    position: sticky;
    top: 0;
    z-index: 20;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.25rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-mark {
    background: linear-gradient(135deg, #2563eb, #22c55e);
    color: #f9fafb;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.logo-text {
    font-size: 1.05rem;
    font-weight: 600;
}

.main-nav {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.95rem;
}

.main-nav a {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    transition: background 0.15s ease, color 0.15s ease;
}

.main-nav a:hover {
    background: rgba(243, 244, 246, 0.12);
}

.btn-outline {
    border: 1px solid rgba(249, 250, 251, 0.4);
}

/* Layout */

.site-main {
    min-height: calc(100vh - 120px);
}

/* Hero */

.hero {
    padding: 3rem 0 2.75rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr);
    gap: 2.5rem;
    align-items: center;
}

.hero-content h1 {
    font-size: 2.3rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.02rem;
    color: #4b5563;
    max-width: 34rem;
}

.hero-actions {
    margin-top: 1.7rem;
    display: flex;
    gap: 0.9rem;
    align-items: center;
}

.hero-actions.secondary {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.hero-actions .divider {
    opacity: 0.6;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.3rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb, #22c55e);
    color: #f9fafb;
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
    opacity: 0.95;
}

.btn-secondary {
    background: #ffffff;
    color: #111827;
    border: 1px solid #e5e7eb;
}

.btn-secondary:hover {
    background: #f3f4f6;
}

.link-inline {
    text-decoration: underline;
    text-decoration-style: dotted;
}

.hero-stats {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.stat-card {
    background: #ffffff;
    padding: 0.9rem 1rem;
    border-radius: 0.8rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
    min-width: 11rem;
}

.stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.stat-value {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0.25rem 0;
}

.stat-sub {
    font-size: 0.8rem;
    color: #4b5563;
}

/* Panels */

.hero-panel {
    display: flex;
    flex-direction: column;
    gap: 1.3rem;
}

.panel-card {
    background: #0f172a;
    color: #e5e7eb;
    border-radius: 1rem;
    padding: 1.4rem 1.5rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.65);
}

.panel-card.subtle {
    background: #ffffff;
    color: #111827;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.1);
}

.panel-card h2,
.panel-card h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
}

.panel-steps {
    padding-left: 1.1rem;
    margin: 0;
    font-size: 0.9rem;
}

.panel-steps li + li {
    margin-top: 0.4rem;
}

.feature-list {
    list-style: disc;
    padding-left: 1.1rem;
    margin: 0;
    font-size: 0.9rem;
}

.feature-list li + li {
    margin-top: 0.35rem;
}

/* Sections */

.section {
    padding: 2.5rem 0;
}

.section.alt {
    background: #111827;
    color: #e5e7eb;
}

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

.section-grid h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

/* Auth & Forms */

.auth-wrapper {
    padding: 2.5rem 0;
}

.auth-card {
    max-width: 480px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.8rem 2rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
}

.auth-card h2 {
    margin-top: 0;
    margin-bottom: 0.25rem;
}

.auth-card p {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    color: #4b5563;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: #374151;
}

.form-control,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.55rem 0.7rem;
    border-radius: 0.55rem;
    border: 1px solid #d1d5db;
    font-size: 0.92rem;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    background: #f9fafb;
}

.form-textarea {
    min-height: 90px;
    resize: vertical;
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
    background: #ffffff;
}

.form-actions {
    margin-top: 1.2rem;
    display: flex;
    justify-content: flex-end;
}

/* Tables & badges */

.table-card {
    margin-top: 1.5rem;
    background: #ffffff;
    border-radius: 1rem;
    padding: 1.2rem 1.4rem;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.table-card h3 {
    margin-top: 0;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.table th,
.table td {
    padding: 0.55rem 0.6rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

.badge {
    display: inline-block;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.badge-priority-low {
    background: #ecfdf3;
    color: #15803d;
}

.badge-priority-medium {
    background: #fef9c3;
    color: #854d0e;
}

.badge-priority-high {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-status-pending {
    background: #e5e7eb;
    color: #111827;
}

.badge-status-approved {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-status-assigned {
    background: #e0f2fe;
    color: #0369a1;
}

.badge-status-in-progress {
    background: #fef3c7;
    color: #92400e;
}

.badge-status-resolved {
    background: #dcfce7;
    color: #166534;
}

.badge-status-rejected {
    background: #fee2e2;
    color: #b91c1c;
}

/* Dashboard layout */

.dashboard-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    min-height: calc(100vh - 64px);
}

.sidebar {
    background: #020617;
    color: #e5e7eb;
    padding: 1.3rem 1rem;
}

.sidebar h2 {
    font-size: 1rem;
    margin-top: 0;
    margin-bottom: 1rem;
}

.sidebar-nav a {
    display: block;
    padding: 0.45rem 0.75rem;
    border-radius: 0.6rem;
    font-size: 0.9rem;
    color: #e5e7eb;
    margin-bottom: 0.25rem;
}

.sidebar-nav a:hover {
    background: rgba(148, 163, 184, 0.22);
}

.sidebar-meta {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 1.8rem;
}

.dashboard-main {
    padding: 1.5rem 1.8rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dashboard-header h1 {
    margin: 0;
    font-size: 1.4rem;
}

.dashboard-filters {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.dashboard-filters select,
.dashboard-filters button {
    font-size: 0.8rem;
}

/* Cards */

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

.kpi-card {
    background: #ffffff;
    border-radius: 0.9rem;
    padding: 0.85rem 0.95rem;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.08);
}

.kpi-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

.kpi-value {
    font-size: 1.2rem;
    font-weight: 700;
    margin-top: 0.3rem;
}

.kpi-sub {
    font-size: 0.8rem;
    color: #4b5563;
}

/* Footer */

.site-footer {
    background: #020617;
    color: #9ca3af;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.footer-inner {
    text-align: center;
    font-size: 0.85rem;
}

.footer-meta {
    margin-top: 0.25rem;
}

/* Flash messages */

.alert {
    padding: 0.7rem 0.9rem;
    border-radius: 0.6rem;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
}

/* Utility */

.text-right {
    text-align: right;
}

.text-muted {
    color: #6b7280;
}

/* Responsive */

@media (max-width: 840px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .hero-panel {
        order: -1;
    }
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.7rem;
    }
    .dashboard-layout {
        grid-template-columns: minmax(0, 1fr);
    }
    .sidebar {
        border-bottom: 1px solid #111827;
    }
}
