/* Custom App Styles Extracted from Blade Files */

/* Common Utilities */
.smallest {
    font-size: 0.75rem !important;
    font-weight: 500;
}

.fw-black {
    font-weight: 900 !important;
}

.uppercase {
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.shadow-none {
    box-shadow: none !important;
}

.tracking-wider {
    letter-spacing: 0.05em;
}

.letter-spacing-1 {
    letter-spacing: 1px !important;
}

.tracking-widest {
    letter-spacing: 0.1em !important;
}

.tracking-tighter {
    letter-spacing: -0.05em !important;
}

.lh-sm {
    line-height: 1.25 !important;
}

.hover-link:hover {
    opacity: 0.8;
}

.bg-primary-subtle {
    background-color: #e0f2fe !important;
}

.text-primary {
    color: #0ea5e9 !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }

    100% {
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out forwards;
}

.animate-slide-up {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-pulse {
    animation: pulse 2s infinite ease-in-out;
}

/* Dashboard Styles */
.stat-badge {
    padding: 10px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 800;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

.dashboard-stat-card {
    transition: 0.3s;
}

.dashboard-stat-card:hover {
    transform: translateY(-5px);
}

/* Invoice List Styles */
.page-link {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border-radius: 3px !important;
}

.modern-invoice-table {
    border-collapse: separate;
    border-spacing: 0 4px;
    background: transparent;
}

.modern-invoice-table thead th {
    border: none;
    padding: 12px 12px;
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    color: #475569 !important;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.modern-invoice-table thead th:first-child {
    border-radius: 3px 0 0 3px;
}

.modern-invoice-table thead th:last-child {
    border-radius: 0 3px 3px 0;
}

.modern-invoice-table tbody tr {
    background: rgba(255, 255, 255, 0.5);
    transition: background 0.2s;
    cursor: pointer;
}

.modern-invoice-table tbody tr:nth-child(even) {
    background: rgba(240, 249, 255, 0.6);
}

.modern-invoice-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.9) !important;
}

.modern-invoice-table td {
    border-top: 1px solid rgba(226, 232, 240, 0.25);
    border-bottom: 1px solid rgba(226, 232, 240, 0.25);
    padding: 10px 12px;
    line-height: 1.1;
}

.modern-invoice-table td:first-child {
    border-left: 1px solid rgba(226, 232, 240, 0.25);
    border-radius: 8px 0 0 8px;
}

.modern-invoice-table td:last-child {
    border-right: 1px solid rgba(226, 232, 240, 0.25);
    border-radius: 0 8px 8px 0;
}

.action-view-btn {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    max-height: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #f0f9ff !important;
    color: #03a9f4 !important;
    border: 1px solid #e0f2fe !important;
    border-radius: 4px !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.action-view-btn svg {
    width: 16px !important;
    height: 16px !important;
    flex-shrink: 0 !important;
}

.action-view-btn:hover {
    background: #03a9f4 !important;
    color: white !important;
    transform: scale(1.1);
    border-color: #03a9f4 !important;
}

.row-status-paid {
    border-left: 5px solid #10b981 !important;
}

.row-status-pending {
    border-left: 5px solid #f59e0b !important;
}

.row-status-overdue {
    border-left: 5px solid #ef4444 !important;
}

/* Gradient Buttons */
.btn-green-gradient {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.btn-blue-gradient {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.btn-purple-gradient {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%) !important;
    border: none !important;
    color: white !important;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.2);
}

/* Invoice Show Styles */
:root {
    --primary-gradient: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    --secondary-gradient: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    --premium-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.invoice-page-wrapper {
    line-height: 1.3 !important;
}

.item-row {
    opacity: 0;
    animation: fadeIn 0.4s ease-out forwards;
    animation-delay: var(--delay);
}

.btn-action-primary {
    background: var(--primary-gradient);
    color: white;
    border: none;
    padding: 10px 24px;
    font-weight: 700;
    border-radius: 12px !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.btn-action-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(14, 165, 233, 0.4);
    color: white;
}

.btn-action-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid #e2e8f0;
    padding: 10px 24px;
    font-weight: 700;
    border-radius: 12px !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.btn-action-secondary:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
}

.invoice-card {
    border-radius: 3px !important;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 100px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-pending {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fef3c7;
}

.status-pending .status-dot {
    background: #f59e0b;
    box-shadow: 0 0 8px #f59e0b;
}

.status-paid {
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #dcfce7;
}

.status-paid .status-dot {
    background: #22c55e;
    box-shadow: 0 0 8px #22c55e;
}

.status-overdue {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fee2e2;
}

.status-overdue .status-dot {
    background: #ef4444;
    box-shadow: 0 0 8px #ef4444;
}

@media print {
    .invoice-page-wrapper {
        animation: none !important;
        margin: 0;
        padding: 0;
    }

    .btn-action-primary,
    .btn-action-secondary,
    .breadcrumb {
        display: none !important;
    }

    .invoice-card {
        box-shadow: none !important;
        border: 1px solid #eee !important;
        border-radius: 0 !important;
    }

    .main-container {
        padding: 0 !important;
    }

    body {
        background: white !important;
    }
}

/* Client Table Styles */
.stat-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.2;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
    overflow: hidden;
}

.card-header {
    padding: 16px 32px;
    border-bottom: 1px solid var(--border);
    background: #fff;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #fcfdfe;
    text-align: left;
    padding: 12px 32px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border);
}

.table-row:hover {
    background: #f8fafc;
}

.data-table td {
    border-bottom: 1px solid #f1f5f9;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 6px 12px -3px rgba(14, 165, 233, 0.4);
    transition: 0.2s;
}

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

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
}

.action-btn {
    background: #fff;
    border: 1px solid var(--border);
    color: var(--text-muted);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.2s;
}

.action-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* Login Page Styles */
.login-body {
    font-family: 'Ubuntu', sans-serif;
    background: #f8fafc;
}

.login-wrapper {
    max-width: 400px;
    border-radius: 20px;
    background: white;
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
    border: none;
}

.sbs-logo {
    background: #e6f0ff;
    color: #0d6efd;
    border-radius: 14px;
    padding: 12px 24px;
    display: inline-block;
}

.form-label-custom {
    font-size: 0.70rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    margin-bottom: 8px;
}

.form-control-custom {
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    color: #1e293b;
    box-shadow: none;
    transition: all 0.2s;
}

.form-control-custom::placeholder {
    color: #94a3b8;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 2px;
    transform: translateY(2px);
}

.form-control-custom[type="email"]::placeholder {
    font-size: 0.95rem;
    letter-spacing: normal;
    transform: none;
    font-weight: 700;
}

.form-control-custom:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px #eff6ff;
    outline: none;
}

.btn-custom {
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 800;
    padding: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #0d6efd;
    border: none;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.2);
    transition: all 0.2s;
}

.btn-custom:hover {
    background: #0b5ed7;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(13, 110, 253, 0.3);
}

/* Register Page Styles */
.register-box {
    max-width: 480px;
    padding: 60px;
}

.grid-inputs {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.error-msg {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 5px;
    font-weight: 500;
}

.alert-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    padding: 15px;
    border-radius: 12px;
    color: #b91c1c;
    margin-bottom: 25px;
    font-size: 0.9rem;
}

/* Custom Toggle Switch */
.custom-switch {
    display: inline-block;
    width: 40px;
    height: 20px;
    position: relative;
}

.custom-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: #0ea5e9;
}

input:checked+.slider:before {
    transform: translateX(20px);
}

/* Custom Button Colors */
.btn-search {
    background: #10b981;
    color: white;
    border: none;
}

.btn-cancel {
    background: #f59e0b;
    color: white;
    border: none;
}

/* ── Colorful Named Buttons ─────────────────────────────────── */

/* List / Back to list  → indigo */
.btn-list {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    border-color: #4f46e5 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35) !important;
}
.btn-list:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.45) !important;
    color: #fff !important;
}

/* Cancel  → amber/orange */
.btn-cancel-action {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    border-color: #d97706 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35) !important;
}
.btn-cancel-action:hover {
    background: linear-gradient(135deg, #d97706, #b45309) !important;
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.45) !important;
    color: #fff !important;
}

/* Save  → emerald green */
.btn-save {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    border-color: #059669 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35) !important;
}
.btn-save:hover {
    background: linear-gradient(135deg, #059669, #047857) !important;
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.45) !important;
    color: #fff !important;
}

/* Add Payment  → teal */
.btn-add-payment {
    background: linear-gradient(135deg, #14b8a6, #0d9488) !important;
    border-color: #0d9488 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(20, 184, 166, 0.35) !important;
}
.btn-add-payment:hover {
    background: linear-gradient(135deg, #0d9488, #0f766e) !important;
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.45) !important;
    color: #fff !important;
}

/* Download PDF  → sky blue */
.btn-pdf {
    background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
    border-color: #0284c7 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.35) !important;
}
.btn-pdf:hover {
    background: linear-gradient(135deg, #0284c7, #0369a1) !important;
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.45) !important;
    color: #fff !important;
}

/* Print  → slate */
.btn-print {
    background: linear-gradient(135deg, #64748b, #475569) !important;
    border-color: #475569 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(100, 116, 139, 0.35) !important;
}
.btn-print:hover {
    background: linear-gradient(135deg, #475569, #334155) !important;
    box-shadow: 0 6px 16px rgba(100, 116, 139, 0.45) !important;
    color: #fff !important;
}


/* Global Button Standardization */
.btn {
    font-family: 'Ubuntu', sans-serif !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    letter-spacing: 0.02em !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    min-height: 40px !important;
    height: 40px !important;
    border-radius: 6px !important;
    padding: 0 18px !important;
    transition: all 0.2s ease-in-out !important;
    gap: 10px !important;
    white-space: nowrap !important;
}

.input-group .form-control:focus {
    z-index: 3 !important;
}

.input-group .btn {
    z-index: 2 !important;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-sm {
    min-height: 34px !important;
    height: 34px !important;
    font-size: 0.85rem !important;
    padding: 0 14px !important;
}

.btn-lg {
    min-height: 46px !important;
    height: 46px !important;
    font-size: 1rem !important;
    padding: 0 22px !important;
}

/* Standardized Color Buttons */
.btn-search-primary {
    background-color: #00a8ff !important;
    border-color: #00a8ff !important;
    color: #fff !important;
}

.btn-adjustment {
    background-color: #9c27b0 !important;
    border-color: #9c27b0 !important;
    color: #fff !important;
}

.btn-create {
    background-color: #1b5e20 !important;
    border-color: #1b5e20 !important;
    color: #fff !important;
}

.btn-filter-toggle {
    background-color: #1a1d21 !important;
    color: white !important;
}

.btn-update-search {
    background-color: #03a9f4 !important;
    border-color: #03a9f4 !important;
    color: #fff !important;
}

/* Status Badge Standardization */
.modern-badge {
    font-size: 0.65rem !important;
    letter-spacing: 0.5px !important;
    text-transform: uppercase !important;
    font-weight: 800 !important;
}

/* Form Controls */
.form-control-standard {
    height: 38px !important;
    font-size: 0.85rem !important;
    border-radius: 3px !important;
}

.form-select-standard {
    height: 38px !important;
    font-size: 0.85rem !important;
    border-radius: 3px !important;
}

/* Fallback when Bootstrap JS/CSS fails to load */
.top-navbar .dropdown-menu:not(.show) {
    display: none !important;
}

.modal.fade:not(.show) {
    display: none !important;
}

nav .pagination {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}