/* style.css */
:root {
    --primary-color: #00529B;
    --secondary-color: #E60000; /* Warna merah Telkom */
    --background-color: #f4f7fc;
    --card-background: #ffffff;
    --text-color: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
    --shadow: 0 4px 8px rgba(0,0,0,0.05);
    --border-radius: 12px;
    --animation-duration: 0.5s;
    --animation-delay-unit: 0.15s;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

/* Back Button */
.back-button-container {
    margin-bottom: 20px;
}

.back-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.back-button .arrow {
    margin-right: 8px;
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.back-button:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

.back-button:hover .arrow {
    transform: translateX(-3px);
}

/* Header Styling */
.main-header {
    background-color: var(--card-background);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-left: 5px solid var(--secondary-color);
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(230,0,0,0.05) 0%, rgba(0,82,155,0.05) 100%);
    border-radius: 50%;
    transform: translate(100px, -100px);
    z-index: 0;
}

.telkom-logo {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
}

.telkom-logo img {
    width: 60px;
    height: auto;
    opacity: 0.9;
    transition: transform 0.3s ease;
}

.telkom-logo img:hover {
    transform: scale(1.1) rotate(5deg);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.main-header h1 {
    margin: 0;
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
}

.header-witel {
    margin: 5px 0 0;
    color: var(--text-light);
    font-size: 1.1em;
    position: relative;
    z-index: 1;
}

.status-badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.status-badge.done { 
    background: linear-gradient(45deg, #28a745, #20c997);
}

.status-badge.oa { 
    background: linear-gradient(45deg, #17a2b8, #20c997);
}

.status-badge.mat-del { 
    background: linear-gradient(45deg, #007bff, #6f42c1);
}

.status-badge.drop { 
    background: linear-gradient(45deg, #dc3545, #fd7e14);
}

.status-badge.in-progress,
.status-badge.pending { 
    background: linear-gradient(45deg, #ffc107, #fd7e14);
    color: #333;
}

/* Card Styling */
.card {
    background-color: var(--card-background);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 0;
    background: var(--primary-color);
    transition: height 0.5s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card:hover::after {
    height: 100%;
}

.card h2 {
    margin-top: 0;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.5rem;
    position: relative;
}

.card h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-grid div {
    line-height: 1.6;
    padding: 10px;
    border-radius: 8px;
    background-color: rgba(0,0,0,0.02);
    transition: background-color 0.3s ease;
}

.info-grid div:hover {
    background-color: rgba(0,0,0,0.04);
}

.info-grid strong {
    color: var(--primary-color);
    font-weight: 600;
    display: block;
    margin-bottom: 3px;
}

.info-grid span {
    color: var(--text-color);
    font-weight: 500;
}

/* Progress Circle Styling */
.progress-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.progress-item {
    text-align: center;
    flex: 1;
    min-width: 120px;
    max-width: 200px;
}

.progress-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    padding: 5px;
    margin: 0 auto 15px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.progress-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background-color: white;
    border-radius: 50%;
}

.progress-inner span {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.progress-inner small {
    font-size: 0.8rem;
    color: var(--text-light);
}

.progress-label {
    font-weight: 500;
    color: var(--text-color);
    margin-top: 10px;
}

.mt-3 {
    margin-top: 20px;
}

/* Galeri Gambar */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.image-item {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.image-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.image-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.image-item:hover img {
    transform: scale(1.05);
}

.image-item .placeholder {
    width: 100%;
    height: 150px;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 0.9em;
}

.image-item p {
    margin: 0;
    padding: 10px;
    background-color: #f9f9f9;
    font-size: 0.9em;
    color: var(--text-color);
    font-weight: 500;
}

/* Daftar Dokumen */
.document-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.document-list .document-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-radius: var(--border-radius);
    background-color: #f9f9f9;
    transition: all 0.3s ease;
    text-decoration: none;
    color: var(--primary-color);
    border: 1px solid var(--border-color);
}

.document-list .document-item.available:hover {
    background-color: #f1f5f9;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.document-item.unavailable {
    color: #999;
    cursor: not-allowed;
    opacity: 0.7;
}

.document-item .icon {
    margin-right: 15px;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(0,82,155,0.1);
    border-radius: 50%;
    color: var(--primary-color);
}

.document-item.unavailable .icon {
    background-color: rgba(0,0,0,0.05);
}

/* Loading Animation */
.loader {
    text-align: center;
    padding: 50px 20px;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 4px solid rgba(230, 0, 0, 0.1);
    border-radius: 50%;
    border-left-color: var(--secondary-color);
    animation: spin 1s linear infinite;
    margin-bottom: 15px;
}

.loader p {
    color: var(--text-light);
    font-size: 1.1em;
    margin: 10px 0;
}

.loading-progress {
    max-width: 300px;
    height: 4px;
    background-color: #f0f0f0;
    border-radius: 2px;
    margin: 15px auto 0;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    width: 0%;
    background-color: var(--secondary-color);
    border-radius: 2px;
    animation: progress 2s ease-in-out infinite;
}

.loading-placeholder {
    text-align: center;
    padding: 30px;
    color: var(--text-light);
    background-color: #f9f9f9;
    border-radius: 8px;
    font-size: 0.9em;
    animation: pulse 1.5s infinite alternate;
}

/* Footer */
.site-footer {
    text-align: center;
    padding: 20px;
    margin-top: 30px;
    color: var(--text-light);
    font-size: 0.9em;
    border-top: 1px solid var(--border-color);
    background-color: white;
}

.site-footer p {
    margin: 5px 0;
}

/* Utility Classes */
.hidden {
    display: none;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

@keyframes pulse {
    0% { opacity: 0.6; }
    100% { opacity: 1; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slide-up {
    from { 
        opacity: 0; 
        transform: translateY(30px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

/* Apply animations */
.animate-fade-in {
    animation: fade-in var(--animation-duration) ease forwards;
    opacity: 0;
}

.animate-slide-up {
    animation: slide-up var(--animation-duration) ease forwards;
    opacity: 0;
    animation-delay: calc(var(--animation-order) * var(--animation-delay-unit));
}

/* Shimmer loading effect */
.shimmer {
    position: relative;
    overflow: hidden;
    background: #f6f7f8;
    background: linear-gradient(to right, #f6f7f8 8%, #edeef1 18%, #f6f7f8 33%);
    background-size: 800px 100px;
    color: transparent !important;
    border-radius: 4px;
    animation: shimmer 1.5s infinite linear;
}

@keyframes shimmer {
    0% { background-position: -468px 0; }
    100% { background-position: 468px 0; }
}

/* Pulse animation for status badge while loading */
.pulse {
    animation: badge-pulse 1.5s infinite;
}

@keyframes badge-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Responsive Design */
@media (max-width: 768px) {
    .main-header h1 {
        font-size: 1.5rem;
    }
    
    .card {
        padding: 20px;
    }
    
    .card h2 {
        font-size: 1.3rem;
    }
    
    .progress-circle {
        width: 80px;
        height: 80px;
    }
    
    .progress-inner span {
        font-size: 1.5rem;
    }
    
    .image-gallery {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .image-item img, 
    .image-item .placeholder {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }
    
    .main-header {
        padding: 15px;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .progress-container {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .document-list {
        grid-template-columns: 1fr;
    }
    
    .telkom-logo img {
        width: 45px;
    }
}
/* Edit Button */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
}

.header-left {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.header-right {
    display: flex;
    align-items: center;
}

.edit-button {
    background: linear-gradient(135deg, var(--secondary-color), #ff4757);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(230, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(230, 0, 0, 0.3);
}

.edit-button i {
    font-size: 1em;
}

/* Timeline Grid */
.timeline-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.timeline-item:hover {
    background-color: #f0f5ff;
    transform: translateX(5px);
}

.timeline-icon {
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    color: white;
    font-size: 1.2em;
}

.timeline-content {
    display: flex;
    flex-direction: column;
}

.timeline-content strong {
    color: var(--primary-color);
    font-size: 0.9em;
    margin-bottom: 3px;
}

.timeline-content span {
    color: var(--text-color);
    font-weight: 500;
}

/* Issue History */
.issue-history {
    max-height: 400px;
    overflow-y: auto;
}

.issue-item {
    padding: 15px;
    background-color: #f9f9f9;
    border-left: 4px solid var(--primary-color);
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
}

.issue-item:hover {
    background-color: #f0f5ff;
    transform: translateX(5px);
}

.issue-timestamp {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
    font-size: 0.9em;
}

.issue-text {
    color: var(--text-color);
    line-height: 1.6;
}

/* Kendala Badge */
.kendala-badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 15px;
    font-weight: 600;
    font-size: 0.9em;
}

.kendala-badge.no-issue {
    background-color: #d4edda;
    color: #155724;
}

.kendala-badge.has-issue {
    background-color: #fff3cd;
    color: #856404;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    margin: 20px;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    border: none;
    background: none;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.modal-close:hover {
    transform: scale(1.2);
}

.modal-body {
    padding: 30px;
    max-height: calc(90vh - 180px);
    overflow-y: auto;
}

.modal-footer {
    padding: 20px 30px;
    background-color: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #e0e0e0;
}

/* Form Sections */
.form-section {
    margin-bottom: 30px;
}

.form-section h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.required {
    color: var(--secondary-color);
}

.text-muted {
    color: var(--text-light);
    font-size: 0.85em;
    font-weight: normal;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 82, 155, 0.1);
}

.readonly-field {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 82, 155, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading State for Save Button */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid white;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-right {
        width: 100%;
    }
    
    .edit-button {
        width: 100%;
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-header h2 {
        font-size: 1.2rem;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .timeline-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-footer {
        flex-direction: column-reverse;
    }
    
    .modal-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Scrollbar Styling */
.modal-body::-webkit-scrollbar,
.issue-history::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track,
.issue-history::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb,
.issue-history::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

.modal-body::-webkit-scrollbar-thumb:hover,
.issue-history::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Section Icons */
.card h2 i {
    margin-right: 10px;
    color: var(--secondary-color);
}

