/* Infomail Custom Theme
   Based on Infomail.it color scheme
   Primary: #32373c (dark gray)
   Accent: #0693e3 (cyan blue)
   Secondary: #ff6900 (orange)
*/

/* === PRIMARY COLORS === */
.text-primary {
    color: #0693e3 !important;
}

/* Sidebar background */
.bg-purple-100 {
    background-color: #32373c !important;
}

.bg-purple-500 {
    background-color: #0693e3 !important;
}

/* Color utilities */
a.color-purple-500,
a.color-purple-500:active,
a.color-purple-500:hover {
    color: #32373c;
}

.color-purple-500 {
    color: #0693e3;
}

/* === BUTTONS === */
.btn-primary {
    background-color: #32373c;
    border-color: #32373c;
    color: #fff;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #0693e3;
    border-color: #0693e3;
    color: #fff;
}

.btn-primary:not(:disabled):not(.disabled).active,
.btn-primary:not(:disabled):not(.disabled):active {
    background-color: #0693e3;
    border-color: #0693e3;
}

.btn-secondary {
    background-color: #d9e2ec;
    border-color: #edf2f5;
    color: #32373c;
}

.btn-secondary:hover {
    background-color: #cfdae7;
    border-color: #e3ebf0;
    color: #32373c;
}

.btn-secondary:not(:disabled):not(.disabled).active,
.btn-secondary:not(:disabled):not(.disabled):active,
.show > .btn-secondary.dropdown-toggle {
    background-color: #e3ebf0;
    border-color: #e3ebf0;
    color: #32373c;
}

.btn-outline-primary {
    color: #0693e3;
    border-color: #0693e3;
}

.btn-outline-primary:hover {
    background-color: #0693e3;
    border-color: #0693e3;
    color: #fff;
}

.btn-outline-purple {
    color: #7c3aed;
    border-color: #7c3aed;
    background-color: transparent;
}

.btn-outline-purple:hover,
.btn-outline-purple:focus {
    background-color: #7c3aed;
    border-color: #7c3aed;
    color: #fff;
}

.btn-outline-purple:not(:disabled):not(.disabled).active,
.btn-outline-purple:not(:disabled):not(.disabled):active {
    background-color: #6d28d9;
    border-color: #6d28d9;
    color: #fff;
}

/* === SIDEBAR (Admin-style fixed) === */
:root {
    --sidebar-width: 280px;
    --header-height: 60px;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    z-index: 1050;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    background: #292d31;
}

.sidebar-brand img {
    height: 35px;
    filter: brightness(0) invert(1);
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1040;
}

.sidebar-overlay.show {
    display: block;
}

/* Main wrapper */
.main-wrapper {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin 0.3s ease;
}

/* Sidebar toggle in header */
.sidebar-toggle {
    display: none;
}

/* Sidebar nav items */
.sidebar li.nav-item a.nav-link {
    border-left: 6px solid #32373c;
    white-space: nowrap;
    overflow: hidden;
    transition: all 0.2s ease;
}

.sidebar li.nav-item a.nav-link:hover {
    background: #3d4247;
    border-left-color: #3d4247;
}

.sidebar li.nav-item.active a.nav-link {
    background: #3d4247;
    border-left-color: #0693e3;
}

/* === NAVIGATION === */
.nav-pills a.nav-link {
    color: #32373c;
    font-size: 1.1rem;
    font-weight: 500;
    padding: 0.6rem 1.2rem;
}

.nav-pills a.nav-link.active {
    color: #32373c;
    font-weight: 600;
}

.nav-pills a.nav-link.active,
.nav-pills a.nav-link:hover {
    border-bottom: 4px solid #0693e3;
}

/* === TABLES === */
.table th {
    color: #32373c;
}

/* === PAGINATION === */
ul.pagination .page-item.active .page-link {
    background-color: #32373c;
    border-color: #32373c;
}

ul.pagination .page-link {
    color: #32373c;
}

ul.pagination .page-link:hover {
    color: #0693e3;
}

/* === WIDGETS === */
.widget {
    border-bottom: 3px solid #0693e3;
}

/* === PROGRESS BAR === */
.progress-bar {
    background-color: #0693e3;
}

/* === FORM CONTROLS === */
.form-control:focus {
    border-color: #0693e3;
}

.select2-container--default.select2-container--focus .select2-selection--multiple {
    border: 1px solid #0693e3;
}

/* === DROPDOWN === */
.main-header .dropdown-item:hover .fas {
    color: #0693e3;
}

/* === LINKS === */
a {
    color: #0693e3;
}

a:hover {
    color: #0573b8;
}

a.btn-link {
    color: #0693e3;
}

/* === HEADER === */
.main-header .workspace-select {
    border-color: rgba(50, 55, 60, 0.1);
}

/* Page heading/title */
.main-header h1,
.main-header .h3 {
    font-size: 1.75rem !important;
    font-weight: 600 !important;
}

/* === BADGES === */
.btn-primary .badge {
    color: #e6f6ff;
}

/* === CHECKBOXES & RADIOS with Primary === */
.abc-checkbox-primary input[type=checkbox]:checked + label:before,
.abc-checkbox-primary input[type=radio]:checked + label:before {
    background-color: #0693e3;
    border-color: #0693e3;
}

.abc-radio-primary input[type=radio] + label:after {
    background-color: #0693e3;
}

.abc-radio-primary input[type=radio]:checked + label:before {
    border-color: #0693e3;
}

.abc-radio-primary input[type=radio]:checked + label:after {
    background-color: #0693e3;
}

/* === LOGO STYLING === */
.logo img {
    max-width: 175px;
    height: auto;
}

/* Login/Register pages - ensure logo is visible on dark backgrounds */
.sidebar .logo img,
.modal-body .logo img {
    filter: brightness(0) invert(1);
}

/* === EMPTY STATE (Unified) === */

/* Base dimensions for all empty states */
.empty-state-card,
.empty-state-content,
.card .table tbody tr td[colspan] {
    min-height: calc(100vh - 350px);
}

.empty-state-card .card-body {
    min-height: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Table empty state */
.card .table tbody tr td[colspan],
.card .table tbody tr td.empty-table-cell {
    vertical-align: middle;
    text-align: center;
    padding: 0;
}

.card .table tbody tr td.empty-table-cell .empty-state-content {
    min-height: calc(100vh - 350px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

/* Unified empty state inner content */
.empty-state-card .card-body .text-center,
.empty-state-content .text-center {
    color: #6c757d;
}

/* Simple table empty text (dashboard cards, etc.) */
.card .table tbody tr td[colspan] .empty-table-text {
    color: #6c757d;
    font-size: 1rem;
    padding: 1.5rem 1rem;
    margin: 0;
    display: block;
}

/* Icon styling */
.empty-state-card .fa-4x,
.empty-state-content .fa-4x,
.card .table tbody tr td[colspan] .fa-4x {
    font-size: 4rem;
    color: #adb5bd;
    margin-bottom: 1.5rem;
}

/* Title styling */
.empty-state-card h4,
.empty-state-content h4 {
    font-size: 1.5rem !important;
    font-weight: 500 !important;
    color: #6c757d !important;
    margin-bottom: 0.75rem !important;
}

/* Description styling */
.empty-state-card p,
.empty-state-content p {
    font-size: 1.1rem !important;
    color: #868e96 !important;
    margin: 0 !important;
}

/* Flexbox alignment for non-table empty states */
.empty-state-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Button styling in empty states */
.empty-state-card .btn,
.empty-state-content .btn {
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
    font-weight: 500;
}

/* === ROUNDED CARDS & MODALS === */
.card,
.card-rounded {
    border-radius: 1rem;
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.card-header,
.card-header-styled {
    border-radius: 0 !important;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
}

.card-header h5 {
    font-weight: 600;
    color: #32373c;
}

.card-body {
    padding: 1.25rem;
}

/* Rounded Modals */
.modal-rounded,
.modal-content {
    border-radius: 1rem;
    border: none;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.modal-header-styled,
.modal-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.25rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 0.75rem 1.25rem;
}

/* Rounded Buttons */
.btn-rounded,
.btn {
    border-radius: 0.5rem;
}

.btn-sm {
    border-radius: 0.4rem;
}

/* Rounded Progress Bars */
.progress,
.progress-rounded {
    border-radius: 1rem;
    height: 0.6rem;
    background-color: #e9ecef;
    overflow: hidden;
}

.progress-bar {
    border-radius: 1rem;
    transition: width 0.4s ease;
}

/* Rounded Form Controls */
.form-control {
    border-radius: 0.5rem;
}

/* Rounded Dropdowns */
.dropdown-menu {
    border-radius: 0.75rem;
    border: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    padding: 0.5rem;
    overflow: hidden;
}

.dropdown-item {
    border-radius: 0.5rem;
    padding: 0.5rem 0.75rem;
}

/* Rounded Table */
.table-rounded {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    border-top: none;
    border-bottom: 2px solid #e9ecef;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6c757d;
    font-weight: 600;
    padding: 0.75rem 1rem;
}

.table tbody td {
    padding: 0.85rem 1rem;
    vertical-align: middle;
    border-top: 1px solid #f1f3f5;
}

.table-hover tbody tr:hover {
    background-color: rgba(6, 147, 227, 0.03);
}

/* Rounded Alerts/Toasts */
.alert {
    border-radius: 0.75rem;
}

/* Rounded Pagination */
.page-item:first-child .page-link {
    border-top-left-radius: 0.5rem;
    border-bottom-left-radius: 0.5rem;
}

.page-item:last-child .page-link {
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

/* === CARD HEADER BUTTONS (Override btn-sm) === */
.card-header .btn.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    font-weight: 500;
}

.card-header .btn.btn-primary {
    padding: 0.5rem 1.25rem;
    font-size: 1rem;
}

/* === RESPONSIVE === */

/* Mobile devices */
@media (max-width: 575.98px) {
    .logo img {
        max-width: 140px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Tablet and Mobile - sidebar hidden by default */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .main-wrapper {
        margin-left: 0 !important;
    }

    .sidebar-toggle {
        display: block;
    }

    .main-content {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Desktop and larger */
@media (min-width: 992px) {
    .sidebar .logo img {
        max-width: 175px;
    }

    .sidebar-toggle {
        display: none;
    }
}

/* === SETTINGS/FORM PAGES - Larger Text === */

/* Card body description text */
.card-body > p.text-muted {
    font-size: 1.1rem !important;
}

/* Section headers in forms */
.card-body h6 {
    font-size: 1.15rem !important;
    font-weight: 600 !important;
}

/* Small text descriptions - make them bigger */
.card-body p.text-muted.small,
.card-body .text-muted.small,
.card-body small.text-muted {
    font-size: 0.95rem !important;
}

/* Form labels */
.card-body label {
    font-size: 1rem !important;
    font-weight: 500 !important;
}

/* Alert text in cards */
.card-body .alert {
    font-size: 1rem !important;
}

/* List items in sidebar cards */
.card-body ul.text-muted.small li,
.card-body ul li {
    font-size: 0.95rem !important;
    margin-bottom: 0.5rem;
}

/* Card titles */
.card-header .card-title {
    font-size: 1.15rem !important;
}
