/* ========================================
   AMIN APP - CUSTOM THEME
   Brand Colors: Primary #053444, Secondary #7c94a4, Light #cdd6db
   ======================================== */

:root {
    /* AMIN Brand Colors */
    --amin-primary: #053444;
    --amin-secondary: #7c94a4;
    --amin-light: #cdd6db;
    --amin-white: #ffffff;
    --amin-dark: #2c3e50;
    --amin-success: #27ae60;
    --amin-warning: #f39c12;
    --amin-danger: #e74c3c;
    --amin-info: #3498db;
}

/* Custom Primary Button */
.btn-primary {
    background-color: var(--amin-primary) !important;
    border-color: var(--amin-primary) !important;
    color: var(--amin-white) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #042a35 !important;
    border-color: #042a35 !important;
    box-shadow: 0 0 0 0.25rem rgba(5, 52, 68, 0.25) !important;
}

/* Custom Secondary Button */
.btn-outline-secondary {
    color: var(--amin-secondary) !important;
    border-color: var(--amin-secondary) !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus,
.btn-outline-secondary:active {
    background-color: var(--amin-secondary) !important;
    border-color: var(--amin-secondary) !important;
    color: var(--amin-white) !important;
}

/* Custom Form Controls */
.form-control:focus {
    border-color: var(--amin-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(5, 52, 68, 0.25) !important;
}

.form-label {
    color: var(--amin-dark) !important;
    font-weight: 600 !important;
}

/* Custom Card Styling */
.card {
    border: none !important;
    box-shadow: 0 0.5rem 1rem rgba(5, 52, 68, 0.15) !important;
}



.card-title {
    color: var(--amin-primary) !important;
    font-weight: 700 !important;
}

/* Custom Alert Styling */
.alert-info {
    background-color: rgba(124, 148, 164, 0.1) !important;
    border-color: var(--amin-secondary) !important;
    color: var(--amin-dark) !important;
}

/* Custom Link Colors */
.text-primary {
    color: var(--amin-primary) !important;
}

a.text-primary:hover {
    color: #042a35 !important;
}

/* Custom Checkbox */
.form-check-input:checked {
    background-color: var(--amin-primary) !important;
    border-color: var(--amin-primary) !important;
}

.form-check-input:focus {
    border-color: var(--amin-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(5, 52, 68, 0.25) !important;
}

/* Custom Right Side Background */
.bg-primary {
    background-color: var(--amin-primary) !important;
}

/* Custom Gradient Background */
.hero-gradient {
    background: linear-gradient(135deg, var(--amin-primary) 0%, var(--amin-secondary) 100%) !important;
}

/* Custom Feature Icons */
.feature-icon {
    border-color: var(--amin-light) !important;
    color: var(--amin-primary) !important;
}

.feature-icon:hover {
    background-color: var(--amin-light) !important;
    border-color: var(--amin-primary) !important;
}

/* Custom Logo Styling */
.amin-logo {
    max-width: 200px;
    height: auto;
    border-radius: 1rem;
    filter: drop-shadow(0 2px 4px rgba(5, 52, 68, 0.2));
}

/* Custom Text Colors */
.text-muted {
    color: var(--amin-secondary) !important;
}

/* Custom Footer */
.footer-text {
    color: var(--amin-secondary) !important;
    font-size: 0.875rem;
}

/* Custom Input Group */
.input-group .form-control:focus {
    z-index: 3;
}

.input-group .btn:focus {
    z-index: 3;
}

/* Custom Spinner */
.spinner-border {
    color: var(--amin-white) !important;
}

/* Custom Success/Error Messages */
.alert-success {
    background-color: rgba(39, 174, 96, 0.1) !important;
    border-color: var(--amin-success) !important;
    color: var(--amin-success) !important;
}

.alert-danger {
    background-color: rgba(231, 76, 60, 0.1) !important;
    border-color: var(--amin-danger) !important;
    color: var(--amin-danger) !important;
}

/* Custom Responsive Adjustments */
@media (max-width: 768px) {
    .amin-logo {
        max-width: 100px;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
}

/* Custom Animation for Logo */
.amin-logo {
    transition: transform 0.3s ease-in-out;
}

.amin-logo:hover {
    transform: scale(1.05);
}

/* Custom Focus States */
.btn:focus,
.form-control:focus,
.form-check-input:focus {
    outline: none !important;
}

/* Custom Border Radius */
.rounded-3 {
    border-radius: 0.75rem !important;
}

.rounded-4 {
    border-radius: 1rem !important;
}

/* ========================================
   RESULTS SECTION STYLING
   ======================================== */

/* Results Section */
#resultsSection {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Results Table */
#resultsTable .table {
    margin-bottom: 0;
}

#resultsTable .table th {
    background-color: var(--amin-light) !important;
    border-bottom: 2px solid var(--amin-primary) !important;
    color: var(--amin-primary) !important;
    font-weight: 600 !important;
    padding: 1rem 0.75rem !important;
}

#resultsTable .table td {
    padding: 1rem 0.75rem !important;
    vertical-align: middle !important;
    border-bottom: 1px solid var(--amin-light) !important;
}

#resultsTable .table tbody tr:hover {
    background-color: rgba(5, 52, 68, 0.05) !important;
    transition: background-color 0.2s ease;
}

/* Slot Count Badge */
#slotCount {
    background-color: var(--amin-primary) !important;
    border: none !important;
    font-size: 0.875rem !important;
    padding: 0.5rem 1rem !important;
}

/* Loading State */
#loadingState {
    color: var(--amin-primary) !important;
}

#loadingState .spinner-border {
    color: var(--amin-primary) !important;
    width: 3rem;
    height: 3rem;
}

/* No Results State */
#noResults {
    color: var(--amin-secondary) !important;
}

#noResults i {
    color: var(--amin-light) !important;
}

/* Action Buttons in Table */
#resultsTable .btn-sm {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
    border-radius: 0.5rem !important;
}

/* Date Range Inputs */
.date-input {
    border-color: var(--amin-light) !important;
}

.date-input:focus {
    border-color: var(--amin-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(5, 52, 68, 0.25) !important;
}

/* Form Text Help */
.form-text {
    color: var(--amin-secondary) !important;
    font-size: 0.875rem !important;
}

/* ========================================
   CLEAN DETAIL LAYOUT - SIMPLE & MODERN
   ======================================== */

/* Detail Row Layout */
.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.detail-row:last-child {
    border-bottom: none;
}

/* Detail Label */
.detail-label {
    min-width: 100px;
    font-weight: 600;
    color: var(--amin-primary);
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.detail-label i {
    color: var(--amin-secondary);
    font-size: 0.9rem;
}

/* Detail Content Container */
.detail-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Detail Item */
.detail-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Detail Key */
.detail-key {
    font-weight: 500;
    color: var(--amin-secondary);
    font-size: 0.8rem;
    min-width: 80px;
}

/* Detail Value - Simple Text */
.detail-value {
    color: var(--amin-dark);
    font-size: 0.875rem;
    font-weight: 500;
}

/* Detail Tag - Only for Status Items */
.detail-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Status-specific tag styling */
.detail-tag.status-visited {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.detail-tag.status-completed {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.detail-tag.status-pending {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Technical Details Section - Minimal */
.tech-details-minimal {
    display: flex;
    gap: 1rem;
    font-size: 0.65rem;
    color: var(--amin-secondary);
    background-color: #f8f9fa;
    padding: 0.375rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid #e9ecef;
}

/* Compact Customer and Location Info Layout */
.customer-info-compact,
.location-info-compact {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
    height: 100%;
}

/* Responsive adjustments for small screens */
@media (max-width: 768px) {
    .customer-info-compact,
    .location-info-compact {
        margin-bottom: 1rem;
    }
    
    .info-value {
        max-width: 120px;
        font-size: 0.75rem;
    }
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    border-bottom: 1px solid #e9ecef;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--amin-secondary);
    font-size: 0.75rem;
    min-width: 80px;
}

.info-value {
    color: var(--amin-dark);
    font-size: 0.8rem;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
    max-width: 150px;
}

/* Compact Visit Status */
.visit-status-compact {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #e9ecef;
}

.visit-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: var(--amin-dark);
}

.visit-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
}

.visit-item i {
    color: var(--amin-secondary);
    font-size: 0.9rem;
}

.tech-item {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.tech-item strong {
    color: var(--amin-dark);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tech-item span {
    color: var(--amin-secondary);
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .detail-row {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .detail-label {
        min-width: auto;
    }
    
    .detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .detail-key {
        min-width: auto;
    }
    
    .tech-details-minimal {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.375rem;
    }
}

/* ========================================
   COMPACT MODAL CARD STYLES
   ======================================== */

/* Modal Card Container */
.modal-card {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    overflow: hidden;
}

/* Modal Card Header */
.modal-card-header {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    color: var(--amin-primary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.modal-card-header i {
    color: var(--amin-secondary);
    font-size: 1rem;
}

/* Modal Card Body */
.modal-card-body {
    padding: 1rem;
}

/* Compact Info Items */
.info-compact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    border: 1px solid #e9ecef;
    height: 100%;
}

.info-compact .info-label {
    font-weight: 600;
    color: var(--amin-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0;
}

.info-compact .info-value {
    color: var(--amin-dark);
    font-size: 0.875rem;
    font-weight: 500;
    margin: 0;
    word-break: break-word;
    text-align: left;
    max-width: none;
}

/* Status Items */
.status-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    border: 1px solid #e9ecef;
    height: 100%;
}

.status-label {
    font-weight: 600;
    color: var(--amin-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}



/* Media Section */
.media-section {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 1rem;
}

.media-section:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.media-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.media-title {
    font-weight: 600;
    color: var(--amin-dark);
    font-size: 0.875rem;
}

.media-count {
    background-color: var(--amin-secondary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

/* No Media Message */
.no-media-message {
    text-align: center;
    padding: 1rem;
    color: var(--amin-secondary);
    font-size: 0.875rem;
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    border: 1px solid #e9ecef;
}

/* Completed Date Info */
.completed-date-info {
    background-color: #f8f9fa;
    padding: 0.5rem 1rem;
    border-top: 1px solid #e9ecef;
    color: var(--amin-secondary);
    font-size: 0.875rem;
    text-align: center;
}

/* Responsive adjustments for modal cards */
@media (max-width: 768px) {
    .modal-card-body .row {
        margin: 0;
    }
    
    .modal-card-body .col-4,
    .modal-card-body .col-6 {
        padding: 0.25rem;
    }
    
    .info-compact,
    .status-item {
        padding: 0.375rem;
    }
    
    .info-compact .info-value {
        font-size: 0.8rem;
    }
}
