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

:root {
    --crm-bg: #eef4ff;
    --crm-surface: rgba(255, 255, 255, 0.9);
    --crm-surface-strong: #ffffff;
    --crm-border: rgba(36, 62, 120, 0.12);
    --crm-text: #16324f;
    --crm-muted: #667792;
    --crm-primary: #1d5cff;
    --crm-primary-deep: #1541b8;
    --crm-accent: #10b981;
    --crm-warm: #ff8a3d;
    --crm-shadow: 0 16px 40px rgba(19, 54, 122, 0.10);
}

html {
    font-size: 16px;
}

body {
    font-family: 'Plus Jakarta Sans', 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at top left, rgba(29, 92, 255, 0.12), transparent 28%),
        radial-gradient(circle at top right, rgba(16, 185, 129, 0.10), transparent 24%),
        linear-gradient(180deg, #f4f8ff 0%, #eef3fb 100%);
    color: var(--crm-text);
    letter-spacing: -0.01em;
}

.app-shell {
    min-height: calc(100vh - 64px);
}

.app-sidebar {
    width: 250px;
    flex: 0 0 250px;
}

.app-main {
    min-width: 0;
    width: calc(100% - 250px);
}

.app-main > .row,
.app-main .row {
    justify-content: flex-start;
}

.app-main .ms-auto,
.app-main .mx-auto {
    margin-left: 0 !important;
}

.app-main .row > [class*="col-"] {
    max-width: 100%;
}

.app-main .card,
.app-main .table-responsive,
.app-main .alert,
.app-main form,
.app-main .border.rounded,
.app-main .border {
    width: 100%;
}

.navbar {
    background: linear-gradient(135deg, #204fcf 0%, #1d5cff 48%, #3f7bff 100%) !important;
    box-shadow: 0 10px 30px rgba(20, 65, 184, 0.24);
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: -0.03em;
}

.sidebar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95) 0%, rgba(244, 248, 255, 0.96) 100%) !important;
    border-right: 1px solid var(--crm-border);
}

.sidebar .nav-link {
    border-radius: 10px;
    color: var(--crm-text);
    font-size: 0.98rem;
    font-weight: 600;
    padding: 0.62rem 0.8rem;
    transition: all 0.18s ease;
}

.sidebar .nav-link:hover {
    background: rgba(29, 92, 255, 0.09);
    color: var(--crm-primary-deep);
    transform: translateX(2px);
}

.sidebar .nav-link.active {
    font-weight: 700;
    color: #ffffff !important;
    background: linear-gradient(135deg, var(--crm-primary) 0%, var(--crm-primary-deep) 100%);
    box-shadow: 0 12px 24px rgba(29, 92, 255, 0.22);
}

.card {
    border-radius: 12px;
    border: 1px solid rgba(13, 110, 253, 0.08);
    background: #ffffff;
    backdrop-filter: blur(10px);
    box-shadow: 0 0.5rem 1rem rgba(16, 24, 40, 0.08);
}

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

.card .table-responsive {
    margin-left: -0.8rem;
    margin-right: -0.8rem;
}

.card .table {
    margin-bottom: 0;
}

.btn {
    border-radius: 10px;
    font-size: 0.96rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    padding: 0.55rem 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--crm-primary) 0%, var(--crm-primary-deep) 100%);
    border-color: var(--crm-primary-deep);
    box-shadow: 0 10px 24px rgba(29, 92, 255, 0.18);
}

.btn-outline-secondary,
.btn-outline-primary,
.btn-outline-success,
.btn-outline-dark {
    border-width: 1px;
}

.btn-icon {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border-radius: 8px;
    line-height: 1;
}

.btn-icon i {
    font-size: 0.85rem;
}

.action-buttons {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.3rem;
    align-items: center;
    white-space: nowrap;
}

.form-control,
.form-select {
    border-radius: 10px;
    border-color: rgba(28, 62, 120, 0.16);
    font-size: 0.98rem;
    min-height: 40px;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus {
    border-color: rgba(29, 92, 255, 0.45);
    box-shadow: 0 0 0 0.18rem rgba(29, 92, 255, 0.12);
}

.form-label,
label {
    font-size: 0.92rem;
    font-weight: 700;
    color: #29476b;
    margin-bottom: 0.35rem;
}

.table {
    --bs-table-bg: #ffffff;
    color: var(--crm-text);
    font-size: 0.95rem;
}

.table > :not(caption) > * > * {
    padding: 0.46rem 0.5rem;
    border-bottom-color: rgba(29, 62, 120, 0.08);
    vertical-align: middle;
}

.table thead th {
    background: #f8f9fa;
    color: #23456e;
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.table-hover > tbody > tr:hover > * {
    background: rgba(29, 92, 255, 0.03);
}

.alert {
    border-radius: 12px;
    border: 1px solid transparent;
    font-size: 0.98rem;
}

.badge {
    border-radius: 999px;
    font-weight: 700;
    padding: 0.45em 0.7em;
}

.text-muted,
.small,
small {
    color: var(--crm-muted) !important;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.03em;
    font-weight: 700;
    color: #173455;
}

h5, .h5 {
    font-size: 1.22rem;
}

h6, .h6 {
    font-size: 1.02rem;
}

p,
span,
td,
th,
li,
a,
input,
select,
textarea,
button {
    font-size: 0.98rem;
}

.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border-radius: 10px;
    border: 1px solid rgba(28, 62, 120, 0.16);
    padding: 0.42rem 0.62rem;
    background: #fff;
}

.border,
.border.rounded,
.rounded {
    border-color: var(--crm-border) !important;
}

.bg-light {
    background: rgba(244, 248, 255, 0.85) !important;
}

.container-fluid,
.row,
.col,
[class*="col-"] {
    max-width: 100%;
}

@media (max-width: 991.98px) {
    .app-shell {
        display: block !important;
    }

    .app-sidebar {
        width: 100%;
        flex: 1 1 auto;
        min-height: auto;
    }

    .app-main {
        width: 100%;
    }

    .card .table-responsive {
        margin-left: -0.45rem;
        margin-right: -0.45rem;
    }
}

canvas {
    max-width: 100%;
}
