/* 
 * GLOBAL HANDO THEME OVERRIDES 
 * This file systematically forces all standard Bootstrap 4/5 components 
 * to adhere to the flat, clean Hando aesthetic.
 */

:root {
    --hando-primary: #3b82f6;
    --hando-primary-hover: #2563eb;
    --hando-secondary: #6b7280;
    --hando-success: #10b981;
    --hando-danger: #ef4444;
    --hando-warning: #f59e0b;
    --hando-info: #0ea5e9;
    --hando-dark: #1f2937;
    --hando-light: #f8f9fa;
    --hando-border: #e5e7eb;
    --hando-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
    --hando-radius: 12px;
}

body {
    background-color: var(--hando-light);
    color: var(--hando-dark);
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   CARDS
   ========================================================================== */
.card {
    background-color: #ffffff !important;
    border: 1px solid var(--hando-border) !important;
    border-radius: var(--hando-radius) !important;
    box-shadow: var(--hando-shadow) !important;
    margin-bottom: 24px;
}

.card-header {
    background-color: transparent !important;
    border-bottom: 1px solid #f1f5f9 !important;
    padding: 1.25rem 1.5rem !important;
}

.card-header h1, .card-header h2, .card-header h3, .card-header h4, .card-header h5, .card-header h6 {
    margin-bottom: 0;
    font-weight: 600;
    color: var(--hando-dark);
}

.card-body {
    padding: 1.5rem !important;
}

.card-footer {
    background-color: transparent !important;
    border-top: 1px solid #f1f5f9 !important;
    padding: 1.25rem 1.5rem !important;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
    border-radius: 8px !important;
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease !important;
}

.btn-primary {
    background: var(--hando-primary) !important;
    border-color: var(--hando-primary) !important;
    color: #ffffff !important;
}

.btn-primary:hover, .btn-primary:focus, .btn-primary:active {
    background: var(--hando-primary-hover) !important;
    border-color: var(--hando-primary-hover) !important;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2) !important;
}

.btn-outline-primary {
    background: transparent !important;
    border-color: var(--hando-primary) !important;
    color: var(--hando-primary) !important;
}

.btn-outline-primary:hover, .btn-outline-primary:focus, .btn-outline-primary:active {
    background: var(--hando-primary) !important;
    border-color: var(--hando-primary) !important;
    color: #ffffff !important;
}

.btn-success {
    background: var(--hando-success) !important;
    border-color: var(--hando-success) !important;
    color: #ffffff !important;
}

.btn-danger {
    background: var(--hando-danger) !important;
    border-color: var(--hando-danger) !important;
    color: #ffffff !important;
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.form-control, .form-select, select {
    border-radius: 8px !important;
    border: 1px solid var(--hando-border) !important;
    padding: 0.6rem 1rem !important;
    color: var(--hando-dark) !important;
    background-color: #ffffff !important;
    transition: all 0.2s ease !important;
    box-shadow: none !important;
}

.form-control:focus, .form-select:focus, select:focus {
    border-color: var(--hando-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.1) !important;
}

label {
    font-weight: 500;
    margin-bottom: 0.4rem;
    color: #4b5563;
}

/* ==========================================================================
   TABLES
   ========================================================================== */
.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.table thead th {
    background-color: #f8fafc !important;
    color: #64748b !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem 1.25rem !important;
    border-bottom: 1px solid var(--hando-border) !important;
    border-top: none !important;
}

.table tbody td {
    padding: 1rem 1.25rem !important;
    vertical-align: middle !important;
    border-bottom: 1px solid #f1f5f9 !important;
    color: #334155;
}

.table tbody tr:hover td {
    background-color: #f8fafc !important;
}

/* ==========================================================================
   BADGES (Soft Hando Style)
   ========================================================================== */
.badge {
    padding: 0.4em 0.8em !important;
    font-weight: 600 !important;
    border-radius: 6px !important;
    letter-spacing: 0.3px;
}

.badge-primary, .badge.bg-primary {
    background-color: rgba(59, 130, 246, 0.1) !important;
    color: var(--hando-primary) !important;
}

.badge-success, .badge.bg-success {
    background-color: rgba(16, 185, 129, 0.1) !important;
    color: var(--hando-success) !important;
}

.badge-danger, .badge.bg-danger {
    background-color: rgba(239, 68, 68, 0.1) !important;
    color: var(--hando-danger) !important;
}

.badge-warning, .badge.bg-warning {
    background-color: rgba(245, 158, 11, 0.1) !important;
    color: var(--hando-warning) !important;
}

.badge-info, .badge.bg-info {
    background-color: rgba(14, 165, 233, 0.1) !important;
    color: var(--hando-info) !important;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.pagination .page-item .page-link {
    border: none !important;
    color: #64748b !important;
    border-radius: 6px !important;
    margin: 0 2px;
    font-weight: 500;
}

.pagination .page-item.active .page-link {
    background-color: var(--hando-primary) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.2) !important;
}

.pagination .page-item .page-link:hover {
    background-color: #f1f5f9 !important;
    color: var(--hando-primary) !important;
}

/* Ensure no legacy borders remain */
.border-top-primary {
    border-top: none !important;
}
