/* ============================================
   KASHOMBA ELECTRICAL SYSTEM - GENERAL STYLES
   Colors: Black, Gold, Teal, White
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Times New Roman', 'Arial', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #f8f8f8;
}

/* ========== CUSTOM SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #DAA520;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0a6c6c;
}

/* ========== CONTAINER ========== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== BUTTONS ========== */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    font-family: 'Inter', sans-serif;
    text-decoration: none;
    text-align: center;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.btn:active {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-primary {
    background: #0a6c6c;
    color: #FFFFFF;
}

.btn-primary:hover {
    background: #0a5a5a;
    box-shadow: 0 5px 15px rgba(10, 108, 108, 0.3);
}

.btn-gold {
    background: #DAA520;
    color: #000000;
}

.btn-gold:hover {
    background: #c9971c;
    box-shadow: 0 5px 15px rgba(218, 165, 32, 0.4);
}

.btn-black {
    background: #000000;
    color: #FFFFFF;
}

.btn-black:hover {
    background: #333333;
}

.btn-danger {
    background: #dc3545;
    color: #FFFFFF;
}

.btn-danger:hover {
    background: #c82333;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.btn-success {
    background: #28a745;
    color: #FFFFFF;
}

.btn-success:hover {
    background: #218838;
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

.btn-sm {
    padding: 8px 15px;
    font-size: 12px;
    border-radius: 5px;
}

.btn-lg {
    padding: 15px 30px;
    font-size: 16px;
    border-radius: 10px;
}

.btn-block {
    width: 100%;
    display: block;
}

/* ========== FORMS ========== */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #000000;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #fafafa;
    color: #000000;
}

.form-control:focus {
    outline: none;
    border-color: #DAA520;
    box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.15);
    background: #FFFFFF;
}

.form-control:hover {
    border-color: #0a6c6c;
}

.form-control:disabled {
    background: #f1f1f1;
    cursor: not-allowed;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23DAA520' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* ========== TABLES ========== */
.table-container {
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 20px;
}

.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead {
    background: #0a0a0a;
    color: #FFFFFF;
}

.table thead th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.table tbody tr {
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.table tbody tr:hover {
    background: #fff8e7;
}

.table tbody tr:nth-child(even) {
    background: #fafafa;
}

.table tbody tr:nth-child(even):hover {
    background: #fff8e7;
}

.table tbody td {
    padding: 13px 15px;
    color: #333;
}

.table tbody tr:last-child {
    border-bottom: none;
}

/* ========== CARDS ========== */
.card {
    background: #FFFFFF;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f1f1;
}

.card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #000000;
    letter-spacing: 0.5px;
}

/* ========== STAT CARDS ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: #FFFFFF;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #DAA520;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.stat-card .stat-icon {
    font-size: 30px;
    color: #DAA520;
    margin-bottom: 10px;
}

.stat-card .stat-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #000000;
    margin-bottom: 5px;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

.stat-card.teal {
    border-left-color: #0a6c6c;
}

.stat-card.teal .stat-icon {
    color: #0a6c6c;
}

.stat-card.black {
    border-left-color: #000000;
}

.stat-card.black .stat-icon {
    color: #000000;
}

/* ========== ALERTS ========== */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    font-size: 14px;
    animation: alertAppear 0.4s ease;
}

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

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* ========== STATUS BADGES ========== */
.status-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

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

.status-in-progress {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #17a2b8;
}

.status-completed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #28a745;
}

.status-default {
    background: #f1f1f1;
    color: #666;
    border: 1px solid #ddd;
}

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #FFFFFF;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    position: relative;
    animation: modalSlide 0.3s ease;
}

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

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f1f1f1;
}

.modal-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #000000;
}

.modal-close {
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: 0.3s;
    background: none;
    border: none;
    font-weight: 700;
}

.modal-close:hover {
    color: #dc3545;
    transform: scale(1.2);
}

/* ========== SEARCH BAR ========== */
.search-bar {
    position: relative;
    margin-bottom: 20px;
}

.search-bar input {
    width: 100%;
    padding: 13px 15px 13px 45px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: #fafafa;
}

.search-bar input:focus {
    outline: none;
    border-color: #DAA520;
    box-shadow: 0 0 0 3px rgba(218, 165, 32, 0.15);
    background: #FFFFFF;
}

.search-bar .search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #DAA520;
    font-size: 18px;
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 15px;
    background: #000000;
    color: #FFFFFF;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
}

.pagination button:hover {
    background: #DAA520;
    color: #000000;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination span {
    font-weight: 600;
    color: #000000;
}

/* ========== UTILITY CLASSES ========== */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-gold {
    color: #DAA520;
}

.text-teal {
    color: #0a6c6c;
}

.text-danger {
    color: #dc3545;
}

.text-success {
    color: #28a745;
}

.font-bold {
    font-weight: 700;
}

.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.ml-10 { margin-left: 10px; }
.mr-10 { margin-right: 10px; }

.hidden {
    display: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .card {
        padding: 20px;
    }
    
    .table thead th,
    .table tbody td {
        padding: 10px;
        font-size: 12px;
    }
    
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}