/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo h1 {
    color: #4a5568;
    margin-bottom: 10px;
}

.logo p {
    color: #718096;
    font-size: 14px;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #4a5568;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #667eea;
    color: white;
}

.btn-primary:hover {
    background-color: #5a67d8;
    transform: translateY(-2px);
}

.btn-success {
    background-color: #48bb78;
    color: white;
}

.btn-warning {
    background-color: #ed8936;
    color: white;
}

.btn-danger {
    background-color: #f56565;
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-sm {
    padding: 5px 10px;
    font-size: 14px;
}

/* Alert Styles */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #c6f6d5;
    border-color: #9ae6b4;
    color: #22543d;
}

.alert-error {
    background-color: #fed7d7;
    border-color: #fc8181;
    color: #742a2a;
}

.alert-warning {
    background-color: #feebc8;
    border-color: #fbd38d;
    color: #744210;
}

/* Navbar */
.navbar {
    background-color: #2d3748;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand a {
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-user {
    color: #cbd5e0;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: #4a5568;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

/* Dashboard Cards */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-icon {
    font-size: 40px;
    opacity: 0.7;
}

.card-title {
    font-size: 14px;
    color: #718096;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-value {
    font-size: 32px;
    font-weight: bold;
    color: #2d3748;
}

.card-info {
    font-size: 14px;
    color: #718096;
    margin-top: 5px;
}

/* Table Styles */
.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: #f7fafc;
    border-bottom: 1px solid #e2e8f0;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background-color: #f7fafc;
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.table tr:hover {
    background-color: #f7fafc;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-warning {
    background-color: #feebc8;
    color: #744210;
}

.badge-info {
    background-color: #bee3f8;
    color: #2c5282;
}

.badge-success {
    background-color: #c6f6d5;
    color: #22543d;
}

.badge-danger {
    background-color: #fed7d7;
    color: #742a2a;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
}

/* Form Container */
.form-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    max-width: 600px;
    margin: 0 auto;
}

.form-title {
    margin-bottom: 30px;
    color: #2d3748;
    font-size: 24px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 30px;
}

/* Footer */
.footer {
    margin-top: 50px;
    padding: 20px;
    text-align: center;
    color: #718096;
    font-size: 14px;
    border-top: 1px solid #e2e8f0;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        gap: 15px;
    }
    
    .table-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .table {
        display: block;
        overflow-x: auto;
    }
}

/* Login Info */
.login-info {
    margin-top: 20px;
    padding: 15px;
    background-color: #f7fafc;
    border-radius: 5px;
    font-size: 14px;
    color: #4a5568;
}

.login-info p {
    margin: 5px 0;
}

/* Status Colors */
.status-menunggu { color: #d69e2e; }
.status-diproses { color: #3182ce; }
.status-selesai { color: #38a169; }
.status-ditolak { color: #e53e3e; }

/* Detail Styles */
.detail-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
}

.detail-section h3 {
    margin-bottom: 15px;
    color: #2d3748;
    border-bottom: 2px solid #667eea;
    padding-bottom: 5px;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table th, .detail-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
}

.deskripsi-box {
    background: white;
    padding: 15px;
    border-radius: 5px;
    border: 1px solid #e2e8f0;
    white-space: pre-line;
}

.tindak-lanjut-card {
    background: white;
    border-radius: 5px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #667eea;
}

.tl-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #718096;
    font-size: 14px;
}

.tl-catatan {
    margin-bottom: 10px;
}

.tl-biaya {
    padding: 10px;
    background: #c6f6d5;
    border-radius: 3px;
    color: #22543d;
}

/* Filter Form */
.filter-form {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    flex-wrap: wrap;
}

.filter-form .form-group {
    margin-bottom: 0;
}

/* Text Muted */
.text-muted {
    color: #718096;
    font-size: 12px;
}

/* Form Container Improvements */
.form-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
}


/* ===== IMPROVED CSS ===== */

/* Table Improvements */
.table-responsive {
    overflow-x: auto;
}

.table-hover tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    transform: translateX(5px);
    transition: all 0.3s ease;
}

.table th {
    background-color: #f8fafc;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.5px;
    color: #64748b;
    border-top: none;
}

.table td {
    vertical-align: middle;
    padding: 16px 12px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.empty-state p {
    font-size: 16px;
    margin: 0;
}

/* Badge Improvements */
.badge-light {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
    font-family: 'Courier New', monospace;
    font-weight: bold;
}

.badge-photo {
    background-color: #dbeafe;
    color: #1d4ed8;
    margin-left: 5px;
    padding: 3px 6px;
    font-size: 10px;
}

.badge-category {
    background-color: #ecfdf5;
    color: #047857;
    border: 1px solid #a7f3d0;
    font-weight: 500;
}

.badge-cost {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

/* Tenant Info */
.tenant-info {
    display: flex;
    flex-direction: column;
}

.tenant-name {
    font-weight: 500;
    color: #1e293b;
}

.komplain-title {
    font-weight: 500;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Date Info */
.date-info {
    display: flex;
    flex-direction: column;
}

/* Filter Container */
.filter-container {
    background: #f8fafc;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #e2e8f0;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.filter-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #475569;
    font-size: 14px;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.filter-actions {
    display: flex;
    gap: 10px;
}

.select-filter {
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23475569' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 35px;
}

/* Form Improvements */
.form-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    max-width: 900px;
    margin: 0 auto;
}

.form-header {
    margin-bottom: 30px;
}

.form-title {
    color: #1e293b;
    font-size: 24px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-subtitle {
    color: #64748b;
    font-size: 14px;
}

.select-style {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    background-color: white;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23475569' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 12px;
    appearance: none;
    padding-right: 40px;
}

.select-style:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Character Count */
.char-count {
    text-align: right;
    font-size: 12px;
    color: #94a3b8;
    margin-top: 5px;
}

/* File Upload */
.file-upload {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-upload input[type="file"] {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 6px;
    color: #475569;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 500;
}

.file-upload-label:hover {
    background-color: #e2e8f0;
    border-color: #94a3b8;
}

.file-name {
    color: #64748b;
    font-size: 14px;
    flex: 1;
}

/* Photo Preview */
.photo-preview {
    max-width: 300px;
    max-height: 200px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s;
}

.photo-preview:hover {
    transform: scale(1.02);
}

.preview-container {
    margin-top: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.current-photo {
    margin-bottom: 20px;
    padding: 15px;
    background: #f0f9ff;
    border-radius: 8px;
    border: 1px solid #bae6fd;
}

.photo-actions {
    margin-top: 10px;
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #475569;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #667eea;
}

/* Detail Page */
.detail-page {
    max-width: 1200px;
    margin: 0 auto;
}

.detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e2e8f0;
}

.detail-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-badge-large {
    font-size: 16px;
}

.detail-actions {
    display: flex;
    gap: 10px;
}

.detail-content {
    margin-bottom: 40px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

@media (max-width: 992px) {
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

.detail-col {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.detail-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.detail-card-header {
    background: #f8fafc;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.detail-card-header h3 {
    margin: 0;
    color: #1e293b;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-card-body {
    padding: 20px;
}

/* Detail Info Table */
.detail-info-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-info-table th {
    text-align: left;
    padding: 12px 15px;
    color: #64748b;
    font-weight: 500;
    width: 200px;
    vertical-align: top;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-info-table td {
    padding: 12px 15px;
    color: #1e293b;
}

.detail-info-table tr:not(:last-child) {
    border-bottom: 1px solid #f1f5f9;
}

/* User Info */
.user-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.user-contact {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 13px;
    color: #64748b;
}

.user-contact i {
    width: 16px;
    margin-right: 5px;
}

/* Date Time */
.date-time {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.date-time .date {
    font-weight: 500;
}

.date-time .time {
    font-size: 13px;
    color: #64748b;
}

/* Photo Container */
.photo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.photo-large {
    max-width: 100%;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s;
}

.photo-large:hover {
    transform: scale(1.01);
}

/* Deskripsi Content */
.deskripsi-content {
    line-height: 1.7;
    color: #334155;
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    white-space: pre-line;
}

.deskripsi-box {
    padding: 15px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.deskripsi-box label {
    font-weight: 500;
    color: #475569;
    margin-bottom: 8px;
    display: block;
}

.deskripsi-box p {
    margin: 0;
    line-height: 1.6;
    color: #334155;
}

/* Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e2e8f0;
}

.timeline-item {
    position: relative;
    margin-bottom: 25px;
}

.timeline-marker {
    position: absolute;
    left: -30px;
    top: 5px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #667eea;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #667eea;
}

.timeline-content {
    background: white;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.timeline-title {
    font-weight: 500;
    color: #1e293b;
    display: flex;
    align-items: center;
    gap: 8px;
}

.timeline-date {
    font-size: 12px;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 5px;
}

.timeline-body {
    color: #475569;
    line-height: 1.6;
}

.timeline-footer {
    margin-top: 10px;
}

/* Assign Form */
.assign-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.info-item label {
    font-weight: 500;
    color: #64748b;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.info-item span {
    color: #1e293b;
}

/* Input Group */
.input-group {
    display: flex;
    align-items: center;
}

.input-group-text {
    padding: 10px 15px;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-right: none;
    border-radius: 6px 0 0 6px;
    color: #64748b;
    font-weight: 500;
}

.input-group input {
    border-radius: 0 6px 6px 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    animation: zoomIn 0.3s;
}

@keyframes zoomIn {
    from { transform: scale(0.9); }
    to { transform: scale(1); }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #ccc;
}

/* Table Footer */
.table-footer {
    padding: 15px 20px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 10px 10px;
}

.table-info {
    font-size: 14px;
    color: #64748b;
    text-align: center;
}

/* Text Center */
.text-center {
    text-align: center;
}

/* Button Outline */
.btn-outline {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #475569;
}

.btn-outline:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    color: #1e293b;
    transform: none;
}

/* Dashboard Small */
.dashboard-small {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    margin-bottom: 20px;
}

/* Animation for alerts */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert {
    animation: slideIn 0.3s ease-out;
}

/* Hover effects for cards */
.card {
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.card:hover {
    border-color: #667eea;
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.1);
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Print styles */
@media print {
    .navbar, .footer, .btn, .detail-actions, .filter-container {
        display: none !important;
    }
    
    .container {
        margin: 0;
        padding: 0;
    }
    
    .detail-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}