/* --- Global & Font --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Poppins', sans-serif; background-color: #f0f2f5; color: #333; line-height: 1.6; }

/* --- User Frontend & General Form Styles --- */
.form-container { background-color: #ffffff; margin: 50px auto; padding: 40px; border-radius: 12px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); width: 100%; max-width: 700px; }
.logo-container { text-align: center; margin-bottom: 20px; }
.logo-container img { max-width: 150px; height: auto; }
.form-header { text-align: center; margin-bottom: 30px; }
.form-header h2 { font-size: 28px; font-weight: 700; color: #1a2a4c; margin-bottom: 8px; }
.form-header p { font-size: 16px; color: #666; }
.input-group { margin-bottom: 20px; }
.input-group label { display: block; font-weight: 500; margin-bottom: 8px; color: #444; }
.input-group input, .input-group textarea, .input-group select { width: 100%; padding: 12px 15px; border: 1px solid #ccc; border-radius: 8px; font-size: 15px; font-family: 'Poppins', sans-serif; transition: border-color 0.3s, box-shadow 0.3s; }
.input-group input:focus, .input-group textarea:focus, .input-group select:focus { outline: none; border-color: #007bff; box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15); }
.radio-group { display: flex; gap: 20px; flex-wrap: wrap; }
.radio-group label { display: flex; align-items: center; gap: 8px; font-weight: 400; cursor: pointer; }
.radio-group input[type="radio"] { width: auto; accent-color: #007bff; }
.submit-btn { width: 100%; padding: 15px; border: none; border-radius: 8px; background: linear-gradient(90deg, #007bff, #0056b3); color: white; font-size: 18px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.submit-btn:hover { transform: translateY(-2px); box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3); }
.submit-btn:disabled { background: #aaa; cursor: not-allowed; }
.success-box { border: 1px solid #28a745; background-color: #e9f7ef; padding: 20px; border-radius: 8px; text-align: center; }
.success-box h4 { color: #28a745; font-size: 22px; margin-bottom: 10px; }
.success-box strong { color: #d63384; font-size: 1.1em; }
.error-text { color: #dc3545; font-size: 14px; margin-top: 10px; text-align: center;}
.ticket-check-link { text-align: center; margin-top: 30px; font-size: 15px; }
.ticket-check-link a { color: #007bff; text-decoration: none; font-weight: 500; }
.ticket-check-link a:hover { text-decoration: underline; }
.success-box .action-btn { display: inline-block; margin-top: 15px; padding: 10px 20px; background-color: #28a745; color: #fff; text-decoration: none; border-radius: 5px; font-weight: 500; transition: background-color 0.2s; }
.success-box .action-btn:hover { background-color: #218838; }

/* --- Ticket Check Page Styles --- */
.ticket-check-container { padding: 20px; background-color: #f8f9fa; border: 1px solid #e9ecef; border-radius: 8px; margin-top: 20px; }
.ticket-result-container { margin-top: 30px; }
.ticket-result-container .conversation-card hr { margin: 15px 0; border: 0; border-top: 1px solid #eee; }

/* --- Admin Panel Styles --- */
.login-container { width: 100%; max-width: 400px; margin: 100px auto; padding: 40px; background: #fff; border-radius: 12px; box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1); }
.login-container h2 { text-align: center; margin-bottom: 25px; color: #1a2a4c; }
.admin-wrapper { max-width: 1200px; margin: 30px auto; padding: 0 20px; }
.admin-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; background: #fff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07); margin-bottom: 30px; }
.admin-header h1 { font-size: 24px; color: #1a2a4c; }
.admin-info { display: flex; align-items: center; gap: 20px; }
.logout-btn, .back-btn { display: inline-block; padding: 8px 16px; background-color: #dc3545; color: #fff; text-decoration: none; border-radius: 6px; transition: background-color 0.2s; font-weight: 500; }
.back-btn { background-color: #6c757d; }
.logout-btn:hover { background-color: #c82333; }
.back-btn:hover { background-color: #5a6268; }
.admin-main { background: #fff; padding: 30px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0, 0, 0, 0.07); }
.admin-main h2 { margin-bottom: 20px; color: #1a2a4c; }
.table-container { overflow-x: auto; }
.ticket-table { width: 100%; border-collapse: collapse; }
.ticket-table th, .ticket-table td { padding: 15px; text-align: left; border-bottom: 1px solid #eee; }
.ticket-table thead th { background-color: #f8f9fa; font-weight: 600; color: #495057; }
.ticket-table tbody tr:hover { background-color: #f8f9fa; }
.action-btn { padding: 6px 12px; background-color: #007bff; color: #fff; text-decoration: none; border-radius: 5px; font-size: 14px; transition: background-color 0.2s; }
.action-btn:hover { background-color: #0056b3; }
.status-badge { padding: 4px 8px; border-radius: 12px; font-size: 12px; font-weight: 600; color: #fff; text-transform: capitalize; }
.status-badge.status-baru { background-color: #ffc107; color:#333; }
.status-badge.status-dibalas { background-color: #17a2b8; }
.status-badge.status-selesai { background-color: #28a745; }
.status-badge.status-menunggu-balasan-admin { background-color: #ff9800; }

/* --- Admin View Ticket Page & Conversation Thread Styles --- */
.ticket-detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 25px; margin-bottom: 30px; }
.ticket-info-card, .user-info-card, .conversation-card { background-color: #fff; padding: 25px; border-radius: 10px; border: 1px solid #e9ecef; }
.ticket-info-card h3, .user-info-card h3, .conversation-card h3 { margin-bottom: 15px; border-bottom: 1px solid #ddd; padding-bottom: 10px; }
.ticket-info-card p, .user-info-card p { margin-bottom: 10px; }
.status-form { margin-top: 20px; display: flex; gap: 10px; }
.status-form select { flex-grow: 1; }
.status-form button { padding: 0 15px; border: none; background: #28a745; color: #fff; border-radius: 5px; cursor: pointer; }
.conversation-thread { margin-top: 20px; }
.reply { border: 1px solid #e9ecef; padding: 15px; border-radius: 8px; margin-bottom: 15px; }
.reply-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; color: #6c757d; font-size: 14px; }
.reply-body p { margin: 0; }
.user-reply { background-color: #e9f5ff; border-left: 4px solid #007bff; }
.admin-reply { background-color: #e9f7ef; border-left: 4px solid #28a745; }
.screenshot-thumb { max-width: 200px; margin-top: 10px; border-radius: 5px; border: 1px solid #ddd; display: block; }
.reply-form-container { margin-top: 30px; border-top: 1px solid #eee; padding-top: 20px; }
.reply-form textarea { width: 100%; border-radius: 8px; padding: 15px; font-family: 'Poppins', sans-serif; border: 1px solid #ccc; margin-bottom: 10px; }
.reply-form .submit-btn { width: auto; padding: 10px 25px; float: right; }
@media (max-width: 768px) { .ticket-detail-grid { grid-template-columns: 1fr; } }