/* =====================================================
   SISTEM PAKAR DIAGNOSA PENYAKIT GINJAL
   CSS MASTER FILE
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    line-height: 1.6;
}

/* Container */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: linear-gradient(135deg, #2c3e50, #1a252f);
    color: white;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.navbar-brand {
    font-size: 24px;
    font-weight: bold;
    color: white;
    text-decoration: none;
}

.navbar-menu a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s;
}

.navbar-menu a:hover,
.navbar-menu a.active {
    background: rgba(255,255,255,0.2);
}

.nav-logout {
    background: #e74c3c;
}

.nav-admin {
    background: #3498db;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
}

.card-header h3 {
    margin: 0;
    color: #2c3e50;
}

.card-body {
    padding: 20px;
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.1);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102,126,234,0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 16px;
}

/* Alerts */
.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Grid */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-12 {
    padding: 0 10px;
}

.col-md-4 { flex: 0 0 33.333%; }
.col-md-5 { flex: 0 0 41.666%; }
.col-md-6 { flex: 0 0 50%; }
.col-md-7 { flex: 0 0 58.333%; }
.col-md-8 { flex: 0 0 66.666%; }
.col-md-12 { flex: 0 0 100%; }

/* Welcome Card */
.welcome-card {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
}

.welcome-card h2 {
    margin-bottom: 10px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.stat-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.stat-number {
    font-size: 32px;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #666;
    margin-top: 5px;
}

/* Gejala List */
.gejala-list {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 10px;
}

.gejala-item {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.gejala-item:last-child {
    border-bottom: none;
}

.gejala-item label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.gejala-item input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.cf-select {
    margin-top: 8px;
    margin-left: 28px;
    width: calc(100% - 28px);
    padding: 6px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background: #fafafa;
}

/* Hasil Diagnosa */
.diagnosis-result {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.info-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.info-box h4 {
    margin-bottom: 10px;
    color: #2c3e50;
    border-left: 4px solid #667eea;
    padding-left: 10px;
}

.other-disease {
    background: white;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    background: #667eea;
    color: white;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 11px;
}

.empty-state {
    text-align: center;
    padding: 50px;
    color: #999;
}

/* Progress Bar */
.progress-bar {
    background: rgba(0,0,0,0.1);
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    background: #4caf50;
    height: 10px;
    border-radius: 10px;
    transition: width 0.5s;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

tr:hover {
    background: #f5f5f5;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
}

.pagination a, .pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #667eea;
}

.pagination .active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.close-modal {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 10px;
    }
    
    .navbar-menu {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 5px;
    }
    
    .navbar-menu a {
        margin: 0;
        padding: 5px 10px;
        font-size: 12px;
    }
    
    .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8 {
        flex: 0 0 100%;
        margin-bottom: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .card-header h3 {
        font-size: 18px;
    }
    
    .welcome-card {
        padding: 20px;
    }
    
    .welcome-card h2 {
        font-size: 20px;
    }
}

/* Print Styles */
@media print {
    .navbar, .btn, .pagination {
        display: none;
    }
    
    body {
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Loading Spinner */
.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
}

.tooltip .tooltip-text {
    visibility: hidden;
    background: #333;
    color: white;
    text-align: center;
    padding: 5px 10px;
    border-radius: 6px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 12px;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
}

/* Profile Page */
.profile-header {
    text-align: center;
    margin-bottom: 30px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #667eea;
    margin-bottom: 15px;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 20px;
    margin-top: 40px;
}