/* ============================================
   Life Cloud Solutions - Custom WHMCS Theme
   Purple/Indigo Modern Design
   ============================================ */

/* ==========================================================
   STRUCTURAL OVERRIDES (Bootstrap/WHMCS compatibility)
   ========================================================== */

/* Fix Bootstrap grid spacing */
.row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.row > [class*="col-"] {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

/* Navigation visibility fixes */
@media (min-width: 1024px) {
    nav.lg\\:flex {
        display: flex !important;
    }
}

/* Mobile collapse behavior */
.collapse:not(.show) {
    display: none;
}

.collapse.in {
    display: block;
}

/* Dropdown hover fix */
.group:hover .group-hover\\:visible {
    visibility: visible !important;
    opacity: 1 !important;
}

/* Full-width container override for client area */
.main-content.full-width {
    max-width: none !important;
    width: 100% !important;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* Client area specific - centered content within full-width */
.clientarea-full {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

/* ==========================================================
   BASE STYLES
   ========================================================== */

/* Base Reset & Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #faf5ff 50%, #eef2ff 100%);
    color: #374151;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Links */
a {
    color: #8b5cf6;
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover, a:focus {
    color: #7c3aed;
    text-decoration: none;
    outline: none;
}

/* Buttons - Primary */
.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3);
    transition: all 0.15s ease;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active,
.btn-primary.active {
    background: linear-gradient(135deg, #6d28d9 0%, #4338ca 100%) !important;
    color: #fff !important;
    box-shadow: 0 1px 4px rgba(139, 92, 246, 0.3);
    transform: translateY(0);
}

/* Buttons - Default */
.btn-default {
    background: #fff !important;
    border: 1px solid #e5e7eb !important;
    color: #374151 !important;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.btn-default:hover,
.btn-default:focus {
    background: #faf5ff !important;
    border-color: #c4b5fd !important;
    color: #8b5cf6 !important;
}

.btn-default:active,
.btn-default.active {
    background: #ede9fe !important;
    border-color: #a78bfa !important;
    color: #7c3aed !important;
}

/* Buttons - Success */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
    transition: all 0.15s ease;
}

.btn-success:hover,
.btn-success:focus {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    color: #fff !important;
}

.btn-success:active,
.btn-success.active {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%) !important;
    color: #fff !important;
}

/* Buttons - Danger */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.btn-danger:hover,
.btn-danger:focus {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
    color: #fff !important;
}

/* Buttons - Warning */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.btn-warning:hover,
.btn-warning:focus {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
    color: #fff !important;
}

/* Buttons - Info */
.btn-info {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.15s ease;
}

.btn-info:hover,
.btn-info:focus {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    color: #fff !important;
}

/* Form Controls */
.form-control {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.875rem;
    background: #fff;
    color: #374151;
    transition: all 0.15s ease;
}

.form-control:focus {
    border-color: #c4b5fd;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    outline: none;
}

/* Select */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
}

/* Input Groups */
.input-group-addon {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    padding: 10px 14px;
}

/* Panels/Cards */
.panel {
    background: #fff;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    margin-bottom: 1rem;
    overflow: hidden;
}

.panel-default > .panel-heading {
    background: linear-gradient(135deg, #f9fafb, #fff);
    border-bottom: 1px solid #f3f4f6;
    padding: 1rem 1.25rem;
}

.panel-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.panel-body {
    padding: 1.25rem;
}

.panel-footer {
    background: #f9fafb;
    border-top: 1px solid #f3f4f6;
    padding: 0.75rem 1.25rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table > thead > tr > th {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    padding: 12px 16px;
}

.table > tbody > tr > td {
    padding: 14px 16px;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.table > tbody > tr:hover > td {
    background: #faf5ff;
}

/* Labels/Badges */
.label {
    padding: 4px 10px;
    font-size: 0.6875rem;
    font-weight: 600;
    border-radius: 100px;
    text-transform: uppercase;
}

.label-primary { background: #8b5cf6; color: #fff; }
.label-success { background: #10b981; color: #fff; }
.label-danger { background: #ef4444; color: #fff; }
.label-warning { background: #f59e0b; color: #fff; }
.label-info { background: #3b82f6; color: #fff; }
.label-default { background: #6b7280; color: #fff; }

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-size: 0.875rem;
}

.alert-success { background: #d1fae5; color: #065f46; }
.alert-danger, .alert-error { background: #fee2e2; color: #991b1b; }
.alert-warning { background: #fef3c7; color: #92400e; }
.alert-info { background: #dbeafe; color: #1e40af; }

/* Breadcrumbs */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
    font-size: 0.8125rem;
}

.breadcrumb > li + li::before {
    content: '/';
    color: #d1d5db;
    padding: 0 8px;
}

/* Pagination */
.pagination > li > a,
.pagination > li > span {
    border: 1px solid #e5e7eb;
    color: #374151;
    padding: 8px 14px;
    margin-left: -1px;
    transition: all 0.15s ease;
}

.pagination > li:first-child > a { border-radius: 8px 0 0 8px; }
.pagination > li:last-child > a { border-radius: 0 8px 8px 0; }

.pagination > li > a:hover {
    background: #faf5ff;
    border-color: #c4b5fd;
    color: #8b5cf6;
}

.pagination > .active > a {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
    border-color: #8b5cf6;
    color: #fff;
}

/* Modals */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.modal-header {
    border-bottom: 1px solid #f3f4f6;
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
}

.modal-body { padding: 1.5rem; }

.modal-footer {
    border-top: 1px solid #f3f4f6;
    background: #f9fafb;
    padding: 1rem 1.5rem;
}

/* Tabs */
.nav-tabs {
    border-bottom: 1px solid #e5e7eb;
}

.nav-tabs > li > a {
    border: none;
    border-radius: 0;
    color: #6b7280;
    font-weight: 500;
    padding: 12px 20px;
    margin-bottom: -1px;
}

.nav-tabs > li > a:hover {
    background: transparent;
    color: #8b5cf6;
    border-bottom: 2px solid #c4b5fd;
}

.nav-tabs > li.active > a {
    background: transparent;
    color: #8b5cf6;
    border: none;
    border-bottom: 2px solid #8b5cf6;
}

/* Dropdowns */
.dropdown-menu {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
    padding: 6px;
}

.dropdown-menu > li > a {
    border-radius: 6px;
    color: #374151;
    padding: 10px 12px;
    font-size: 0.875rem;
}

.dropdown-menu > li > a:hover {
    background: #faf5ff;
    color: #8b5cf6;
}

/* List Groups */
.list-group-item {
    border: none;
    border-bottom: 1px solid #f3f4f6;
    padding: 12px 16px;
    transition: all 0.15s ease;
}

.list-group-item:last-child { border-bottom: none; }

.list-group-item:hover { background: #faf5ff; }

.list-group-item.active {
    background: #faf5ff;
    color: #8b5cf6;
    border-left: 3px solid #8b5cf6;
}

/* Progress */
.progress {
    background: #e5e7eb;
    border-radius: 100px;
    height: 8px;
}

.progress-bar { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.progress-bar-success { background: linear-gradient(135deg, #10b981, #059669); }
.progress-bar-danger { background: linear-gradient(135deg, #ef4444, #dc2626); }

/* DataTables */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info {
    font-size: 0.8125rem;
    color: #6b7280;
}

.dataTables_wrapper .dataTables_filter input {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 12px;
}

.dataTables_wrapper .dataTables_filter input:focus {
    border-color: #c4b5fd;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
    outline: none;
}

/* Status colors */
.status-active, .text-success { color: #10b981 !important; }
.status-pending, .text-warning { color: #f59e0b !important; }
.status-cancelled, .text-danger { color: #ef4444 !important; }

/* Remove focus outlines */
.btn:focus, .btn:active:focus, a:focus {
    outline: none !important;
    box-shadow: none;
}

/* Tooltip */
.tooltip-inner {
    background: #1e1b4b;
    padding: 8px 12px;
    font-size: 0.8125rem;
    border-radius: 6px;
}

/* Popover */
.popover {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12);
}

/* Responsive */
@media (max-width: 768px) {
    .panel-body { padding: 1rem; }
    .btn { padding: 10px 16px; }
}

/* Well */
.well {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    box-shadow: none;
}
