/* ===== Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #f0f4f8 0%, #e2e8f0 50%, #f0f4f8 100%);
    min-height: 100vh;
    margin: 0;
    color: #1e293b;
}

/* ===== Hero Header ===== */
.pengaduan-hero {
    background: linear-gradient(135deg, #0e7490 0%, #0891b2 40%, #06b6d4 100%);
    padding: 2.5rem 0 3.5rem;
    position: relative;
    overflow: hidden;
}

.pengaduan-hero::before {
    content: '';
    position: absolute;
    top: -60%;
    right: -20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.pengaduan-hero::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-content h1 {
    font-size: 2rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.hero-content p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 0;
}

.hero-back-btn {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    transition: color 0.2s;
    margin-bottom: 1rem;
}

.hero-back-btn:hover {
    color: #fff;
}

/* ===== Main Content ===== */
.main-content {
    margin-top: -2rem;
    position: relative;
    z-index: 3;
    padding-bottom: 3rem;
}

/* ===== Search Bar ===== */
.search-wrapper {
    background: #fff;
    border-radius: 16px;
    padding: 1.25rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    margin-bottom: 1.5rem;
}

.search-wrapper .input-group {
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e2e8f0;
    transition: border-color 0.2s;
}

.search-wrapper .input-group:focus-within {
    border-color: #0891b2;
}

.search-wrapper .input-group-text {
    background: transparent;
    border: none;
    color: #94a3b8;
    padding-left: 1rem;
}

.search-wrapper .form-control {
    border: none;
    font-size: 0.9375rem;
    padding: 0.75rem 0.5rem;
    color: #1e293b;
}

.search-wrapper .form-control:focus {
    box-shadow: none;
}

.search-wrapper .form-control::placeholder {
    color: #94a3b8;
}

.search-wrapper .btn-search {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.search-wrapper .btn-search:hover {
    background: linear-gradient(135deg, #0e7490, #0c4a6e);
    transform: translateY(-1px);
}

/* ===== Pengaduan Cards ===== */
.pengaduan-card {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 1.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.pengaduan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0891b2, #06b6d4);
    opacity: 0;
    transition: opacity 0.3s;
}

.pengaduan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.pengaduan-card:hover::before {
    opacity: 1;
}

.pengaduan-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.ticket-number {
    font-size: 0.8125rem;
    font-weight: 700;
    color: #0891b2;
    background: #ecfeff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.pengaduan-name {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.pengaduan-name i {
    font-size: 0.75rem;
}

.pengaduan-uraian {
    font-size: 0.875rem;
    color: #334155;
    line-height: 1.6;
    flex-grow: 1;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s;
}

.pengaduan-uraian.expanded {
    -webkit-line-clamp: unset;
}

.pengaduan-footer {
    border-top: 1px solid #f1f5f9;
    padding-top: 0.75rem;
    margin-top: auto;
}

/* ===== Status Badges ===== */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
}

.status-badge i {
    font-size: 0.6875rem;
}

.status-ditanggapi {
    background: #dcfce7;
    color: #15803d;
}

.status-sementara {
    background: #fef9c3;
    color: #a16207;
}

.status-ditolak {
    background: #fee2e2;
    color: #b91c1c;
}

.status-menunggu {
    background: #f1f5f9;
    color: #64748b;
}

.response-text {
    font-size: 0.8125rem;
    color: #475569;
    margin-top: 0.5rem;
    line-height: 1.5;
}

.responder-name {
    font-weight: 600;
    color: #0e7490;
}

/* ===== Pagination ===== */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.pagination-wrapper .pagination {
    gap: 0.375rem;
}

.pagination-wrapper .page-link {
    border: none;
    border-radius: 10px !important;
    font-size: 0.875rem;
    font-weight: 600;
    color: #475569;
    padding: 0.5rem 0.875rem;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
}

.pagination-wrapper .page-link:hover {
    background: #ecfeff;
    color: #0891b2;
    transform: translateY(-1px);
}

.pagination-wrapper .page-item.active .page-link {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    color: #fff;
    box-shadow: 0 4px 12px rgba(8, 145, 178, 0.3);
}

.pagination-wrapper .page-item.disabled .page-link {
    background: #f8fafc;
    color: #cbd5e1;
    box-shadow: none;
}

/* ===== Form Card ===== */
.form-card {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: sticky;
    top: 1rem;
}

.form-card-header {
    background: linear-gradient(135deg, #0e7490 0%, #0891b2 100%);
    padding: 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.form-card-header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.form-card-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.25rem;
    position: relative;
}

.form-card-header p {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0;
    position: relative;
}

.form-card-body {
    padding: 1.5rem;
}

/* ===== Floating Label Inputs ===== */
.floating-group {
    position: relative;
    margin-bottom: 1.25rem;
}

.floating-group .form-control,
.floating-group textarea.form-control {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 0.875rem 0.5rem;
    font-size: 0.875rem;
    color: #1e293b;
    background: #f8fafc;
    transition: all 0.2s;
    width: 100%;
}

.floating-group .form-control:focus,
.floating-group textarea.form-control:focus {
    border-color: #0891b2;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(8, 145, 178, 0.1);
    outline: none;
}

.floating-group label {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.875rem;
    color: #94a3b8;
    pointer-events: none;
    transition: all 0.2s ease;
    background: transparent;
    padding: 0 0.25rem;
}

.floating-group textarea.form-control~label {
    top: 1rem;
    transform: none;
}

.floating-group .form-control:focus~label,
.floating-group .form-control:not(:placeholder-shown)~label {
    top: 0;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #0891b2;
    font-weight: 600;
    background: #fff;
}

.floating-group textarea.form-control:focus~label,
.floating-group textarea.form-control:not(:placeholder-shown)~label {
    top: 0;
    transform: translateY(-50%);
    font-size: 0.75rem;
    color: #0891b2;
    font-weight: 600;
    background: #fff;
}

/* ===== File Upload ===== */
.file-upload-area {
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: #f8fafc;
    margin-bottom: 1.25rem;
}

.file-upload-area:hover {
    border-color: #0891b2;
    background: #ecfeff;
}

.file-upload-area.has-file {
    border-color: #0891b2;
    background: #ecfeff;
}

.file-upload-area i {
    font-size: 1.75rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    display: block;
    transition: color 0.2s;
}

.file-upload-area:hover i {
    color: #0891b2;
}

.file-upload-area .upload-text {
    font-size: 0.8125rem;
    color: #64748b;
}

.file-upload-area .upload-text strong {
    color: #0891b2;
}

.file-upload-area .upload-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.file-upload-area input[type="file"] {
    display: none;
}

.file-name-display {
    font-size: 0.8125rem;
    color: #0891b2;
    font-weight: 600;
    margin-top: 0.5rem;
    display: none;
}

/* ===== Submit Button ===== */
.btn-submit {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.875rem;
    font-size: 0.9375rem;
    font-weight: 700;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: left 0.5s;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(8, 145, 178, 0.3);
    color: #fff;
}

.btn-submit:hover::before {
    left: 100%;
}

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

.form-hint {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.375rem;
}

/* ===== Empty State ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #fff;
    border-radius: 16px;
    border: 2px dashed #e2e8f0;
}

.empty-state i {
    font-size: 3.5rem;
    color: #cbd5e1;
    margin-bottom: 1rem;
    display: block;
}

.empty-state h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.875rem;
    color: #94a3b8;
    margin-bottom: 0;
}

/* ===== Section Title ===== */
.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-title h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.section-title .result-count {
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
}

/* ===== Modal Overrides ===== */
.modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    color: #fff;
    border: none;
    padding: 1.25rem 1.5rem;
}

.modal-header .modal-title {
    font-weight: 700;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.modal-body {
    padding: 1.5rem;
    font-size: 0.9375rem;
    color: #334155;
}

.modal-footer {
    border-top: 1px solid #f1f5f9;
    padding: 1rem 1.5rem;
}

.modal-footer .btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.5rem 1.5rem;
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}

.animate-in:nth-child(1) {
    animation-delay: 0.05s;
}

.animate-in:nth-child(2) {
    animation-delay: 0.1s;
}

.animate-in:nth-child(3) {
    animation-delay: 0.15s;
}

.animate-in:nth-child(4) {
    animation-delay: 0.2s;
}

.animate-in:nth-child(5) {
    animation-delay: 0.25s;
}

.animate-in:nth-child(6) {
    animation-delay: 0.3s;
}

.animate-in:nth-child(7) {
    animation-delay: 0.35s;
}

.animate-in:nth-child(8) {
    animation-delay: 0.4s;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    .form-card {
        position: static;
        margin-bottom: 2rem;
    }

    .pengaduan-hero {
        padding: 2rem 0 3rem;
    }

    .hero-content h1 {
        font-size: 1.625rem;
    }
}

@media (max-width: 767.98px) {
    .pengaduan-hero {
        padding: 1.5rem 0 2.5rem;
    }

    .hero-content h1 {
        font-size: 1.375rem;
    }

    .hero-content p {
        font-size: 0.875rem;
    }

    .main-content {
        margin-top: -1.5rem;
    }

    .search-wrapper {
        padding: 1rem;
    }

    .search-wrapper .btn-search {
        padding: 0.75rem 1rem;
        font-size: 0.8125rem;
    }

    .pengaduan-card {
        padding: 1rem;
    }

    .form-card-body {
        padding: 1.25rem;
    }
}

@media (max-width: 575.98px) {
    .hero-content h1 {
        font-size: 1.25rem;
    }

    .pengaduan-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.375rem;
    }
}