/* 
 * Professional Theme for Public Records Application
 * Inspired by edoctec.com design
 * Clean, modern, government/business focused
 */

/* ========================================
   COLOR PALETTE (edoctec-inspired)
   ======================================== */
:root {
    --primary-blue: #0056b3;
    --secondary-blue: #1976d2;
    --light-blue: #e3f2fd;
    --dark-blue: #003d82;
    --accent-orange: #ff6f00;
    --text-dark: #2c3e50;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #dee2e6;
    --success-green: #28a745;
    --warning-yellow: #ffc107;
    --danger-red: #dc3545;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* ========================================
   BODY & GENERAL STYLES
   ======================================== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    background-color: var(--bg-light);
    font-size: 15px;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--dark-blue);
    font-weight: 600;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    border-bottom: 3px solid var(--primary-blue);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* ========================================
   NAVBAR STYLES (edoctec-style)
   ======================================== */
.navbar {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: white !important;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.navbar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white !important;
}

.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white !important;
}

/* User dropdown */
.navbar .dropdown-menu {
    border: none;
    box-shadow: var(--shadow-hover);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.navbar .dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
}

.navbar .dropdown-item:hover {
    background-color: var(--light-blue);
    color: var(--primary-blue);
}

/* Cart badge */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
}

/* ========================================
   CARD STYLES (Professional Look)
   ======================================== */
.card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    background-color: var(--bg-white);
    margin-bottom: 1.5rem;
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    border-bottom: none;
    padding: 1rem 1.25rem;
    font-weight: 600;
    border-radius: 8px 8px 0 0 !important;
}

.card-header h4,
.card-header h5 {
    color: white;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* ========================================
   BUTTON STYLES (edoctec-inspired)
   ======================================== */
.btn {
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: none;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 86, 179, 0.3);
}

.btn-success {
    background-color: var(--success-green);
}

.btn-success:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.btn-warning {
    background-color: var(--warning-yellow);
    color: var(--text-dark);
}

.btn-warning:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--danger-red);
}

.btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-2px);
}

.btn-info {
    background-color: var(--secondary-blue);
}

.btn-info:hover {
    background-color: var(--primary-blue);
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: var(--primary-blue);
    color: white;
}

/* Button sizes */
.btn-sm {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.75rem 2rem;
    font-size: 1.1rem;
}

/* ========================================
   FORM STYLES (Clean & Professional)
   ======================================== */
.form-control {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.form-control:focus {
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 86, 179, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

/* Custom select */
.form-control option {
    padding: 0.5rem;
}

/* ========================================
   TABLE STYLES (Professional Grid)
   ======================================== */
.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead th {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    color: white !important;
    font-weight: 600;
    border: none;
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.5px;
}

/* Ensure ALL text in headers is white */
.table thead th,
.table thead th *,
.table thead th a,
.table thead th a *,
.table thead th span,
.table thead th i {
    color: white !important;
}

/* Sortable links in headers */
.table thead th a {
    text-decoration: none !important;
    display: inline-block;
    width: 100%;
}

.table thead th a:hover {
    opacity: 0.9;
}

.table tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:hover {
    background-color: var(--light-blue);
    transform: scale(1.01);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: var(--text-dark);
}

/* Striped rows */
.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Sortable column indicators */
.table th.sortable {
    cursor: pointer;
    position: relative;
    user-select: none;
}

.table th.sortable:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ========================================
   ALERT STYLES (Modern Look)
   ======================================== */
.alert {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid var(--success-green);
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid var(--danger-red);
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid var(--warning-yellow);
}

.alert-info {
    background-color: var(--light-blue);
    color: #004085;
    border-left: 4px solid var(--secondary-blue);
}

.alert-dismissible .close {
    padding: 1rem 1.25rem;
    color: inherit;
    opacity: 0.7;
}

.alert-dismissible .close:hover {
    opacity: 1;
}

/* ========================================
   PAGINATION (Clean Style)
   ======================================== */
.pagination {
    margin: 1.5rem 0;
}

.page-link {
    color: var(--primary-blue);
    border: 1px solid var(--border-color);
    padding: 0.5rem 0.75rem;
    margin: 0 2px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.page-link:hover {
    background-color: var(--light-blue);
    border-color: var(--primary-blue);
    color: var(--dark-blue);
}

.page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border-color: var(--primary-blue);
    color: white;
}

.page-item.disabled .page-link {
    color: var(--text-light);
    background-color: var(--bg-light);
}

/* ========================================
   BADGES (Modern Styling)
   ======================================== */
.badge-primary {
    background-color: var(--primary-blue);
}

.badge-success {
    background-color: var(--success-green);
}

.badge-warning {
    background-color: var(--warning-yellow);
    color: var(--text-dark);
}

.badge-danger {
    background-color: var(--danger-red);
}

.badge-info {
    background-color: var(--secondary-blue);
}

/* ========================================
   MODAL STYLES (Professional)
   ======================================== */
.modal-content {
    border: none;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

.modal-header .close {
    color: white;
    opacity: 0.9;
    text-shadow: none;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* ========================================
   LOADING SPINNER (Professional)
   ======================================== */
.spinner-border {
    border-width: 0.3rem;
}

.spinner-border-primary {
    color: var(--primary-blue);
}

/* ========================================
   SEARCH RESULTS HEADER
   ======================================== */
.results-header {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    padding: 1.25rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--light-blue);
    box-shadow: var(--shadow);
}

.results-header h4,
.results-header h4 *,
.results-header strong,
.results-header span,
.results-header {
    color: white !important;
    margin: 0;
    font-weight: 600;
}

/* ========================================
   FOOTER STYLES
   ======================================== */
footer {
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--primary-blue) 100%);
    color: white;
    padding: 2rem 0;
    margin-top: 3rem;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

footer a:hover {
    color: white;
    text-decoration: none;
}

/* ========================================
   PROFESSIONAL TOUCHES
   ======================================== */

/* Icon styling */
.fa, .fas, .far {
    margin-right: 0.5rem;
}

/* Hover effects on links */
a {
    color: var(--primary-blue);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--dark-blue);
    text-decoration: none;
}

/* Container spacing */
.container {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Section dividers */
hr {
    border-top: 2px solid var(--border-color);
    margin: 2rem 0;
}

/* Professional shadows on important elements */
.shadow-sm {
    box-shadow: var(--shadow) !important;
}

.shadow {
    box-shadow: var(--shadow-hover) !important;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
   ======================================== */
*:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-blue);
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    z-index: 100;
}

.skip-to-main:focus {
    top: 0;
}

/* ========================================
   PRINT STYLES
   ======================================== */
@@media print {
    .navbar,
    .pagination,
    .btn,
    footer {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    body {
        background-color: white;
    }
}
