/*
 * iplink — application theme
 * Loaded after css/style.css (Inspinia) and overrides its look.
 */

:root {
    --ip-primary: #7c3aed;
    --ip-primary-600: #6d28d9;
    --ip-primary-700: #5b21b6;
    --ip-fuchsia: #c026d3;
    --ip-grad: linear-gradient(135deg, #7c3aed 0%, #c026d3 100%);
    --ip-amber: #fbbf24;
    --ip-ink: #140b24;
    --ip-ink-2: #1d1233;
    --ip-text: #2a2440;
    --ip-muted: #6e6987;
    --ip-line: #e9e6f2;
    --ip-line-strong: #dcd7ea;
    --ip-bg: #f6f5fb;
    --ip-surface: #ffffff;
    --ip-soft: #f3effe;
    --ip-success: #10b981;
    --ip-danger: #ef4444;
    --ip-warning: #f59e0b;
    --ip-info: #0ea5e9;
    --ip-radius: 16px;
    --ip-radius-sm: 10px;
    --ip-shadow: 0 1px 2px rgba(20, 11, 36, .04), 0 10px 30px -18px rgba(20, 11, 36, .18);
    --ip-shadow-pop: 0 24px 48px -20px rgba(20, 11, 36, .35);
    --ip-ring: 0 0 0 4px rgba(124, 58, 237, .15);
    --ip-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --ip-display: 'Manrope', 'Inter', system-ui, sans-serif;
}

/* ---------- Base ---------- */

body {
    background-color: var(--ip-ink);
    color: var(--ip-text);
    font-family: var(--ip-font);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: var(--ip-display);
    color: var(--ip-ink);
    letter-spacing: -0.01em;
}

a {
    color: var(--ip-primary);
}

a:hover {
    color: var(--ip-primary-700);
}

::selection {
    background: rgba(124, 58, 237, .18);
}

.text-muted {
    color: var(--ip-muted) !important;
}

.text-navy {
    color: var(--ip-primary) !important;
}

.gray-bg,
.bg-muted,
#page-wrapper {
    background-color: var(--ip-bg);
}

.hr-line-dashed {
    border-top: 1px dashed var(--ip-line-strong);
    background: transparent;
    margin: 18px 0;
}

* {
    scrollbar-width: thin;
    scrollbar-color: #cfc8e3 transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: #d6d0e8;
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* ---------- Sidebar ---------- */

.navbar-static-side {
    background: linear-gradient(180deg, #1c1031 0%, var(--ip-ink) 60%);
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, .05);
}

.navbar-default {
    border: 0;
}

#side-menu {
    padding: 0 12px 32px;
}

#side-menu > li.nav-header {
    background: transparent !important;
    border: 0 !important;
    padding: 22px 8px 20px !important;
    margin-bottom: 6px;
}

#side-menu > li.nav-header > a.ip-brand {
    display: block;
    padding: 0;
    background: transparent;
}

#side-menu > li.nav-header > a.ip-brand img {
    display: block;
    height: 34px;
    width: auto;
}

#side-menu > li {
    margin: 2px 0;
    border-left: 0;
    border-radius: 12px;
    background: transparent;
}

#side-menu > li > a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: 12px;
    color: #b4adc9;
    font-weight: 600;
    font-size: 12.5px;
    letter-spacing: .04em;
    transition: background-color .15s ease, color .15s ease;
}

#side-menu > li > a > i.fa:first-child {
    width: 18px;
    margin: 0;
    text-align: center;
    font-size: 15px;
    color: #8f87ab;
    transition: color .15s ease;
}

#side-menu > li > a .nav-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#side-menu > li > a .fa.arrow {
    margin-left: auto;
    float: none;
    color: #6f6790;
}

#side-menu > li > a:hover,
#side-menu > li > a:focus {
    background: rgba(255, 255, 255, .06);
    color: #fff;
}

#side-menu > li > a:hover > i.fa:first-child {
    color: #fff;
}

#side-menu > li.active {
    background: rgba(124, 58, 237, .14);
}

#side-menu > li.active > a {
    color: #fff;
    background: transparent;
}

#side-menu > li.active > a > i.fa:first-child {
    color: #c4b5fd;
}

#side-menu .nav-second-level {
    background: transparent !important;
    padding: 2px 0 8px;
}

#side-menu .nav-second-level li a {
    position: relative;
    display: block;
    padding: 8px 14px 8px 44px;
    margin: 1px 0;
    border-radius: 10px;
    color: #a39cba;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .03em;
}

#side-menu .nav-second-level li a::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 50%;
    width: 6px;
    height: 6px;
    margin-top: -3px;
    border-radius: 50%;
    background: #4a3f66;
    transition: background-color .15s ease, box-shadow .15s ease;
}

#side-menu .nav-second-level li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .04);
}

#side-menu .nav-second-level li.active a {
    color: #fff;
    font-weight: 600;
}

#side-menu .nav-second-level li.active a::before {
    background: var(--ip-amber);
    box-shadow: 0 0 0 4px rgba(251, 191, 36, .18);
}

/* ---------- Top bar ---------- */

#page-wrapper > .row.border-bottom:has(> .navbar-static-top) {
    position: sticky;
    top: 0;
    z-index: 1030;
    border: 0 !important;
}

.navbar.navbar-static-top,
.white-bg .navbar-static-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    padding: 0 18px;
    background: rgba(255, 255, 255, .82);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid var(--ip-line);
}

.navbar-static-top .navbar-header {
    display: flex;
    align-items: center;
    gap: 12px;
    float: none;
}

.navbar-static-top .minimalize-styl-2,
.navbar-static-top .minimalize-styl-2:hover,
.navbar-static-top .minimalize-styl-2:focus {
    float: none;
    width: 40px;
    height: 40px;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--ip-soft);
    border: 1px solid #e4dcfb;
    color: var(--ip-primary);
    box-shadow: none;
}

.navbar-static-top .minimalize-styl-2:hover {
    background: #ebe3fd;
}

.ip-topbar-brand {
    display: none;
}

.ip-topbar-brand img {
    display: block;
    height: 32px;
    width: 32px;
}

body.mini-navbar:not(.body-small) .ip-topbar-brand,
body.body-small:not(.mini-navbar) .ip-topbar-brand {
    display: block;
}

.navbar-static-top .navbar-top-links {
    display: flex;
    align-items: center;
    margin: 0;
}

.navbar-top-links li.ip-topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 6px 4px 4px;
    border: 1px solid var(--ip-line);
    border-radius: 999px;
    background: #fff;
}

.ip-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ip-grad);
    color: #fff;
    font-size: 13px;
}

.ip-topbar-user #login-buttons a,
.ip-topbar-user #login-buttons .login-link-text {
    padding: 0 6px 0 0;
    min-height: 0;
    color: var(--ip-ink);
    font-weight: 600;
    font-size: 13px;
    text-decoration: none;
}

#login-dropdown-list {
    border: 1px solid var(--ip-line) !important;
    border-radius: 14px !important;
    box-shadow: var(--ip-shadow-pop) !important;
    padding: 14px !important;
    background: #fff !important;
    top: 44px !important;
}

#login-buttons .login-button,
.accounts-dialog .login-button {
    border-radius: 10px !important;
    font-weight: 600;
}

/* ---------- Page heading & breadcrumbs ---------- */

.page-heading,
.page-heading.white-bg {
    background: transparent;
    border: 0 !important;
    padding: 28px 10px 4px;
}

.page-heading h2 {
    margin: 0 0 6px;
    font-size: 26px;
    font-weight: 800;
}

.breadcrumb {
    background: transparent;
    padding: 0;
    font-size: 13px;
}

.breadcrumb-item a {
    color: var(--ip-muted);
}

.breadcrumb-item.active,
.breadcrumb-item.active a {
    color: var(--ip-primary);
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '\203A';
    color: #c5c0d6;
}

/* ---------- Cards (ibox) ---------- */

.ibox {
    background: var(--ip-surface);
    border: 1px solid var(--ip-line);
    border-radius: var(--ip-radius);
    box-shadow: var(--ip-shadow);
    margin-bottom: 24px;
}

.ibox-title {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 0;
    border-radius: var(--ip-radius) var(--ip-radius) 0 0;
    min-height: 0;
    padding: 16px 20px !important;
}

.ibox-title .ibox-tools {
    flex: none;
    margin: 0;
}

.ibox-title h5 {
    flex: 1 1 auto;
    min-width: 0;
    float: none;
    margin: 0;
    font-family: var(--ip-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--ip-ink);
}

.ibox-title .label {
    margin-left: 6px;
}

.ibox-tools a,
.ibox-tools i {
    color: var(--ip-muted);
}

.ibox > .collapse-link {
    color: inherit;
    text-decoration: none;
}

.ibox-content {
    background: transparent;
    border: 0;
    padding: 20px;
    border-radius: 0 0 var(--ip-radius) var(--ip-radius);
}

.ibox-title + .ibox-content,
.ibox > .collapse-link + .ibox-content {
    border-top: 1px solid var(--ip-line);
}

.ibox > .ibox-content:first-child {
    border-radius: var(--ip-radius);
}

#map {
    border-radius: 12px;
    overflow: hidden;
}

/* ---------- Buttons ---------- */

.btn {
    border-radius: var(--ip-radius-sm);
    font-weight: 600;
    font-size: 13px;
    padding: 8px 16px;
    letter-spacing: .01em;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease, filter .15s ease;
}

.btn:focus,
.btn.focus {
    box-shadow: var(--ip-ring) !important;
}

.btn-xs {
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 11px;
}

.btn-sm {
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 22px;
    border-radius: 12px;
    font-size: 15px;
}

.btn-primary,
.btn-primary:not(:disabled):not(.disabled),
.btn-primaryb,
.btn-primaryb:not(:disabled):not(.disabled) {
    background-color: var(--ip-primary);
    background-image: var(--ip-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 18px -10px rgba(124, 58, 237, .8);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:not(:disabled):not(.disabled):active,
.btn-primary:not(:disabled):not(.disabled).active,
.btn-primaryb:hover,
.btn-primaryb:focus,
.btn-primaryb:not(:disabled):not(.disabled):active,
.show > .btn-primary.dropdown-toggle {
    background-color: var(--ip-primary-600);
    background-image: var(--ip-grad);
    border-color: transparent;
    color: #fff;
    filter: brightness(1.06);
}

.btn-primary:hover,
.btn-primaryb:hover {
    transform: translateY(-1px);
}

.btn-primary.btn-outline {
    background: transparent;
    color: var(--ip-primary);
    border-color: var(--ip-primary);
    box-shadow: none;
}

.btn-danger,
.btn-danger:hover,
.btn-danger:focus {
    background-color: var(--ip-danger);
    border-color: var(--ip-danger);
    color: #fff;
}

.btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
}

.btn-warning,
.btn-warning:hover,
.btn-warning:focus {
    background-color: var(--ip-warning);
    border-color: var(--ip-warning);
    color: #fff;
}

.btn-success,
.btn-success:hover,
.btn-success:focus {
    background-color: var(--ip-success);
    border-color: var(--ip-success);
    color: #fff;
}

.btn-info,
.btn-info:hover,
.btn-info:focus {
    background-color: var(--ip-info);
    border-color: var(--ip-info);
    color: #fff;
}

.btn-secondary,
.btn-secondary:hover,
.btn-secondary:focus {
    background-color: #efedf6;
    border-color: #efedf6;
    color: var(--ip-text);
}

.btn-secondary:hover {
    background-color: #e5e1f0;
    border-color: #e5e1f0;
}

.btn-white,
.btn-default {
    background: #fff;
    border: 1px solid var(--ip-line-strong);
    color: var(--ip-text);
}

.btn-white:hover,
.btn-default:hover {
    background: var(--ip-soft);
    border-color: #d8ccfb;
    color: var(--ip-primary-700);
}

/* ---------- Forms ---------- */

.form-control,
.single-line {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--ip-line-strong);
    border-radius: var(--ip-radius-sm);
    background-color: #fff;
    color: var(--ip-text);
    font-size: 14px;
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.form-control:hover {
    border-color: #cbc3e2;
}

.form-control:focus,
.single-line:focus {
    border-color: var(--ip-primary) !important;
    box-shadow: var(--ip-ring) !important;
}

.form-control::placeholder {
    color: #a7a1bd;
}

/* plain inputs/selects that the templates render without .form-control */
#page-wrapper select:not([multiple]):not(.form-control):not(.form-select),
#page-wrapper input[type="date"]:not(.form-control),
#page-wrapper input[type="datetime-local"]:not(.form-control),
#page-wrapper input[type="time"]:not(.form-control),
#page-wrapper input[type="number"]:not(.form-control),
#page-wrapper input[type="text"]:not(.form-control) {
    min-height: 40px;
    padding: 6px 12px;
    border: 1px solid var(--ip-line-strong);
    border-radius: var(--ip-radius-sm);
    background-color: #fff;
    color: var(--ip-text);
    font: inherit;
}

#page-wrapper select:not([multiple]):not(.form-control):not(.form-select):focus,
#page-wrapper input:not(.form-control):focus {
    outline: none;
    border-color: var(--ip-primary);
    box-shadow: var(--ip-ring);
}

.form-control-lg {
    min-height: 48px;
    border-radius: 12px;
    font-size: 15px;
}

.form-control[disabled],
.form-control[readonly] {
    background-color: #f7f6fb;
}

.col-form-label,
.control-label,
label {
    color: #4b4566;
    font-weight: 600;
    font-size: 13px;
}

.input-group-addon,
.input-group-text {
    background: #f7f5fc;
    border: 1px solid var(--ip-line-strong);
    color: var(--ip-muted);
    border-radius: var(--ip-radius-sm);
}

.bootstrap-select > .dropdown-toggle,
.bootstrap-select > .dropdown-toggle.btn-light {
    min-height: 40px;
    background: #fff;
    border: 1px solid var(--ip-line-strong);
    border-radius: var(--ip-radius-sm);
    color: var(--ip-text);
    font-weight: 500;
    box-shadow: none;
}

.bootstrap-select .dropdown-menu li a.active,
.bootstrap-select .dropdown-menu li a:active,
.dropdown-item.active,
.dropdown-item:active {
    background: var(--ip-soft);
    color: var(--ip-primary-700);
}

/* ---------- Tables ---------- */

.table {
    color: var(--ip-text);
}

.table > thead > tr > th,
.table thead th {
    background: #faf9fd;
    border-top: 0 !important;
    border-bottom: 1px solid var(--ip-line) !important;
    padding: 12px;
    color: var(--ip-muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table > tbody > tr > td,
.table > tfoot > tr > td,
.table td {
    border-top: 1px solid #f0edf6 !important;
    padding: 12px;
    vertical-align: middle;
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #fbfaff;
}

.table-hover > tbody > tr:hover {
    background-color: #f4f0fe;
}

.table-responsive {
    border-radius: 12px;
}

/* ---------- Labels & badges ---------- */

.label,
.badge {
    font-family: var(--ip-font);
    font-weight: 600;
    font-size: 11px;
    padding: 4px 9px;
    border-radius: 999px;
    background-color: #eeebf5;
    color: #5b5675;
    letter-spacing: .02em;
}

.label-primary,
.badge-primary {
    background-color: #ede5ff;
    color: var(--ip-primary-600);
}

.label-success,
.badge-success {
    background-color: #d1fae5;
    color: #047857;
}

.label-warning,
.badge-warning {
    background-color: #fef3c7;
    color: #b45309;
}

.label-danger,
.badge-danger {
    background-color: #fee2e2;
    color: #b91c1c;
}

.label-info,
.badge-info {
    background-color: #e0f2fe;
    color: #0369a1;
}

.bg-primary {
    background: var(--ip-grad) !important;
    color: #fff;
}

/* ---------- Lists, dropdowns, pagination ---------- */

.list-group-item {
    border-color: var(--ip-line);
}

.list-group-item.active,
a.list-group-item.active,
a.list-group-item.active:hover,
a.list-group-item.active:focus {
    background: var(--ip-soft);
    border-color: #ddd0fd;
    color: var(--ip-primary-700);
}

.dropdown-menu {
    border: 1px solid var(--ip-line);
    border-radius: 14px;
    box-shadow: var(--ip-shadow-pop);
    padding: 6px;
}

.dropdown-menu > li > a,
.dropdown-item {
    border-radius: 8px;
}

.page-link,
.pagination > li > a {
    margin: 0 2px;
    border: 1px solid var(--ip-line);
    border-radius: 8px !important;
    color: var(--ip-text);
}

.page-item.active .page-link,
.pagination .footable-page.active a {
    background: var(--ip-grad);
    border-color: transparent;
    color: #fff;
}

.progress {
    background: #efecf7;
    border-radius: 999px;
}

.progress-bar {
    background: var(--ip-grad);
}

.pace .pace-progress {
    background: var(--ip-grad);
}

.tooltip-inner {
    background-color: var(--ip-ink);
    border-radius: 8px;
    padding: 6px 10px;
}

/* ---------- Modals ---------- */

.modal-backdrop {
    background-color: var(--ip-ink);
}

.modal-backdrop.show {
    opacity: .55;
}

.modal-content {
    border: 0;
    border-radius: 20px;
    box-shadow: 0 30px 60px -20px rgba(20, 11, 36, .45);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--ip-line);
    padding: 18px 22px;
}

.modal-body {
    padding: 22px;
}

.modal-footer {
    border-top: 1px solid var(--ip-line);
    background: #faf9fd;
    padding: 14px 22px;
}

/* ---------- Toastr ---------- */

#toast-container > div {
    opacity: 1;
    border-radius: 14px;
    box-shadow: 0 18px 36px -14px rgba(20, 11, 36, .45);
    font-family: var(--ip-font);
}

#toast-container > div:hover {
    box-shadow: 0 18px 36px -14px rgba(20, 11, 36, .55);
}

#toast-container > .toast-success {
    background-color: #059669;
}

#toast-container > .toast-error {
    background-color: #dc2626;
}

#toast-container > .toast-warning {
    background-color: #d97706;
}

#toast-container > .toast-info {
    background-color: #0284c7;
}

.toast-success .toast-title,
.toast-success .toast-message {
    color: #fff;
}

/* ---------- Footer ---------- */

.footer {
    background: rgba(255, 255, 255, .7);
    border-top: 1px solid var(--ip-line);
    color: var(--ip-muted);
    font-size: 12.5px;
    padding: 14px 20px;
}

.footer strong {
    color: var(--ip-ink);
}

.ip-footer-tag {
    font-family: var(--ip-display);
    font-weight: 700;
    background: var(--ip-grad);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ---------- Home (signed-in) ---------- */

.ip-home-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin: 8px 0 24px;
    padding: 32px;
    border-radius: 22px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(600px 240px at 90% -20%, rgba(192, 38, 211, .55), transparent 70%),
        radial-gradient(500px 260px at 0% 120%, rgba(124, 58, 237, .65), transparent 70%),
        var(--ip-ink);
    box-shadow: 0 30px 60px -32px rgba(76, 29, 149, .7);
}

.ip-home-hero h1 {
    margin: 6px 0 8px;
    color: #fff;
    font-size: 30px;
    font-weight: 800;
}

.ip-home-hero p {
    margin: 0;
    max-width: 520px;
    color: #cfc8e6;
    font-size: 15px;
}

.ip-home-kicker {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: #e9e3ff;
    font-size: 12px;
    font-weight: 600;
}

.ip-home-mark {
    width: 96px;
    height: 96px;
    flex: none;
    filter: drop-shadow(0 18px 30px rgba(192, 38, 211, .45));
}

.ip-quick {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.ip-quick-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 20px;
    border: 1px solid var(--ip-line);
    border-radius: var(--ip-radius);
    background: #fff;
    box-shadow: var(--ip-shadow);
    color: var(--ip-text);
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.ip-quick-card:hover {
    transform: translateY(-3px);
    border-color: #d9cdfc;
    box-shadow: 0 22px 40px -24px rgba(124, 58, 237, .55);
    color: var(--ip-text);
    text-decoration: none;
}

.ip-quick-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--ip-soft);
    color: var(--ip-primary);
    font-size: 18px;
}

.ip-quick-card:hover .ip-quick-icon {
    background: var(--ip-grad);
    color: #fff;
}

.ip-quick-title {
    font-family: var(--ip-display);
    font-weight: 700;
    font-size: 15px;
    color: var(--ip-ink);
}

.ip-quick-sub {
    color: var(--ip-muted);
    font-size: 13px;
}

@media (max-width: 768px) {
    .ip-home-hero {
        padding: 24px;
    }

    .ip-home-hero h1 {
        font-size: 24px;
    }

    .ip-home-mark {
        display: none;
    }

    .page-heading h2 {
        font-size: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .ip-quick-card {
        transition: none;
    }

    .btn-primary:hover,
    .btn-primaryb:hover,
    .ip-quick-card:hover {
        transform: none;
    }
}

#login-dropdown-list .login-close-text {
    color: var(--ip-muted);
    font-size: 12px;
    font-weight: 600;
}
