/* ================================
   MODERN INFORMASI PELAYANAN - REVISED CSS
   Theme: Soft Blue & Elegant High-Contrast
================================ */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
    font-family:'Poppins', sans-serif;
}

body{
    min-height:100vh;
    width: 100vw;
    overflow-x: hidden;
    /* Latar Belakang Biru Soft Gradient Elegant */
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #f0f9ff 100%) !important;
    color:#0f172a;
    padding: 24px;
    font-size: 16px; /* Ukuran dasar diperbesar sedikit */
}

/* ================= WRAPPER FULL ================= */

.header, 
.container, 
.besar, 
footer {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ================= HEADER ================= */

.header{
    margin-bottom: 24px;
    padding: 28px 24px;
    border-radius: 24px;
    /* Gradient Biru Soft Elegant */
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%) !important;
    box-shadow: 0 10px 25px rgba(37, 99, 235, 0.2) !important;
}

.header-content{
    text-align:center;
    color:#ffffff !important;
}

.header h1{
    font-size: 42px; /* Diperbesar agar makin jelas */
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header p{
    margin-top: 6px;
    font-size: 20px; /* Diperbesar */
    font-weight: 600;
    opacity: .95;
}

/* ================= CONTAINER (GRID 3 KOLOM) ================= */

.container{
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: stretch;
}

/* ================= CARD ================= */

.card, .besar{
    background: #ffffff !important;
    border: 1.5px solid #dbeafe !important;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08) !important;
}

.card{
    padding: 26px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    transition: transform .3s ease;
}

.card:hover{
    transform: translateY(-3px);
}

/* ================= TITLE CARD ================= */

.card h2{
    color: #1d4ed8 !important; /* Warna Biru Soft Pekat */
    font-size: 24px; /* Diperbesar */
    font-weight: 700;
    text-align: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 3px solid #bfdbfe !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ================= TABEL ATAS ================= */

.container table{
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.container table tr td{
    padding: 16px 8px;
    vertical-align: middle;
    font-size: 18px; /* Teks diperbesar & makin jelas */
    font-weight: 700;
    color: #0f172a;
    border-bottom: 2px dashed #cbd5e1;
}

.container table tr:last-child td{
    border-bottom: none;
}

.container table td:first-child{
    width: 45px;
    text-align: center;
    font-weight: 800;
    font-size: 19px;
    color: #2563eb !important;
}

.container table td:nth-child(2){
    text-align: left;
    padding-left: 8px;
}

.container table td:last-child{
    text-align: right;
    white-space: nowrap;
}

.container table tr:hover td{
    background: #f1f5f9 !important;
}

/* ================= BADGE STATUS ================= */

.badge{
    display: inline-block;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 15px; /* Diperbesar agar mudah dibaca */
    font-weight: 700;
    margin: 1px;
    box-shadow: 0 2px 5px rgba(0,0,0,.05);
    white-space: nowrap;
}

.permohonan{ background:#fef3c7 !important; color:#d97706 !important; }
.verifikasi{ background:#dbeafe !important; color:#1d4ed8 !important; }
.agenda{ background:#f3e8ff !important; color:#7c3aed !important; }
.terbit{ background:#dcfce7 !important; color:#15803d !important; }

.tambat{ background:#ffe4e6 !important; color:#e11d48 !important; }
.kolam{ background:#dbeafe !important; color:#1d4ed8 !important; }
.labuh{ background:#f3e8ff !important; color:#7c3aed !important; }
.lunas{ background:#dcfce7 !important; color:#15803d !important; }

/* ================= CARD JAM ================= */

.waktu{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.jam-box{
    width: 100%;
    margin: auto 0;
}

#jam{
    font-size: 68px; /* Teks jam lebih jelas dan tegas */
    font-weight: 800;
    color: #1e40af !important;
    letter-spacing: 2px;
    margin: 12px 0;
    text-shadow: 0 4px 12px rgba(30, 64, 175, 0.15);
    font-variant-numeric: tabular-nums;
}

.garis{
    width: 85%;
    height: 4px;
    margin: 16px auto;
    background: linear-gradient(90deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%) !important;
    border-radius: 20px;
}

#tanggal{
    font-size: 22px; /* Diperbesar */
    color: #334155 !important;
    font-weight: 700;
}

/* ================= CARD BESAR (REKOM DIPROSES) ================= */

.besar{
    margin-top: 24px;
    margin-bottom: 24px;
    padding: 28px;
}

.besar h2{
    font-size: 28px !important; /* Diperbesar */
    color: #1d4ed8 !important;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 3px solid #bfdbfe !important;
}

.besar table{
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.besar table tr td{
    padding: 18px 12px;
    font-size: 22px !important; /* Diperbesar agar nyaman di mata */
    font-weight: 700;
    color: #0f172a;
    text-align: left !important;
    border-bottom: 2px dashed #cbd5e1;
}

.besar table tr:last-child td{
    border-bottom: none;
}

.besar table td:first-child{
    width: 60px;
    text-align: center !important;
    font-weight: 800;
    font-size: 24px !important;
    color: #2563eb !important;
}

.besar table td:nth-child(2){
    text-align: left !important;
}

/* ================= ANIMASI KEDIP HALUS ================= */

@keyframes smoothFade {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.fade-updated {
    animation: smoothFade 0.8s ease-in-out forwards;
}

/* ================= FOOTER / HOTLINE WA ================= */

footer{
    margin-top: 24px;
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 50%, #60a5fa 100%) !important;
    color: #fff !important;
    text-align: center;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2) !important;
}

.footer-content{
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ================= STYLE KHUSUS PANEL ADMIN ================= */

.admin-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.admin-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.admin-card-full {
    margin: 0 20px 20px 20px;
}

/* Warna Form Biru Soft & Elegant */
.admin-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 10px;
    margin-bottom: 20px;
    background: #f0f6ff; /* Soft Blue Tint */
    padding: 18px;
    border-radius: 12px;
    border: 1px solid #bfdbfe;
}

.admin-form.form-inline {
    flex-direction: row;
    align-items: center;
}

.flex-1 {
    flex: 1;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 14px;
    font-weight: 700;
    color: #1e40af; /* Text label biru tua */
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #93c5fd;
    border-radius: 10px;
    font-size: 15px;
    font-family: 'Poppins', sans-serif;
    outline: none;
    background: #ffffff;
    transition: all 0.2s ease;
    color: #0f172a;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.checkbox-group {
    display: flex;
    gap: 15px;
    background: #ffffff;
    padding: 10px 14px;
    border: 2px solid #93c5fd;
    border-radius: 10px;
}

.checkbox-group label {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: none;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
    cursor: pointer;
}

.btn-submit {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

.btn-submit:active {
    transform: translateY(0);
}

.table-wrapper {
    max-height: 250px;
    overflow-y: auto;
    border-radius: 8px;
}

.btn-hapus {
    text-decoration: none;
    font-size: 14px;
    padding: 6px 10px;
    background: #ffe4e6;
    color: #e11d48;
    border-radius: 6px;
    font-weight: 600;
    transition: background 0.2s;
}

.btn-hapus:hover {
    background: #fecdd3;
}

.empty-text {
    color: #64748b;
    font-size: 14px;
    padding: 15px 0;
    font-style: italic;
}

/* ================= TABEL ADMIN ALIGNMENT ================= */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    margin-top: 15px;
}

.table-wrapper table {
    width: 100% !important;
    border-collapse: collapse;
    table-layout: fixed !important;
}

.table-wrapper th {
    background-color: #e0e7ff;
    color: #1e40af;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 10px 12px;
    border-bottom: 2px solid #bfdbfe;
}

.table-wrapper td {
    padding: 12px 10px;
    vertical-align: middle;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    border-bottom: 1px solid #e2e8f0;
}

.admin-card .table-wrapper th:nth-child(1),
.admin-card .table-wrapper td:nth-child(1) { width: 55%; text-align: left !important; }

.admin-card .table-wrapper th:nth-child(2),
.admin-card .table-wrapper td:nth-child(2) { width: 30%; text-align: center !important; }

.admin-card .table-wrapper th:nth-child(3),
.admin-card .table-wrapper td:nth-child(3) { width: 15%; text-align: right !important; }

.admin-card-full .table-wrapper th:nth-child(1),
.admin-card-full .table-wrapper td:nth-child(1) { width: 80%; text-align: left !important; }

.admin-card-full .table-wrapper th:nth-child(2),
.admin-card-full .table-wrapper td:nth-child(2) { width: 20%; text-align: right !important; }

/* ================= SIMULASI POP-UP MODAL ================= */

#btnSimulasi {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    padding: 14px 24px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
    z-index: 999;
    transition: transform 0.2s;
}

#btnSimulasi:hover {
    transform: scale(1.05);
}

.modal-simulasi {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    padding: 24px;
    border-radius: 20px;
    width: 340px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    border: 1px solid #bfdbfe;
}

.modal-content h3 {
    margin-bottom: 5px;
    color: #1d4ed8;
}

.modal-content input, .modal-content select {
    padding: 10px;
    border: 2px solid #bfdbfe;
    border-radius: 8px;
    outline: none;
    font-size: 14px;
}

.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.btn-tambah {
    flex: 1; background: #16a34a; color: white; border: none; padding: 10px; border-radius: 8px; font-weight: 700; cursor: pointer;
}
.btn-batal {
    flex: 1; background: #dc2626; color: white; border: none; padding: 10px; border-radius: 8px; font-weight: 700; cursor: pointer;
}

/* ================= ADMIN NAV ================= */

.admin-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    max-width: 1200px;
    margin: 25px auto 0 auto;
    padding: 0 20px;
}

.tab-btn {
    padding: 12px 28px;
    border: none;
    background: #dbeafe;
    color: #1e40af;
    font-weight: 700;
    font-size: 15px;
    border-radius: 12px 12px 0 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background: #bfdbfe;
    color: #1d4ed8;
}

.tab-btn.active {
    background: #ffffff;
    color: #2563eb;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.05);
}


/* ===================================================
   SENSOR RESPONSIVE (HP, TABLET, MONITOR TV 4K)
   =================================================== */

/* 1. LAYAR BESAR / TV DISPLAY MONITOR (≥ 1600px) */
@media (min-width: 1600px) {
    body { padding: 40px; }
    .header h1 { font-size: 54px; }
    .header p { font-size: 24px; }
    .card h2 { font-size: 28px; }
    .container table tr td { font-size: 22px; padding: 20px 10px; }
    .badge { font-size: 18px; padding: 8px 18px; }
    #jam { font-size: 90px; }
    #tanggal { font-size: 28px; }
    .besar h2 { font-size: 34px !important; }
    .besar table tr td { font-size: 26px !important; padding: 22px 14px; }
}

/* 2. TABLET / PAD (1024px - 1280px) */
@media (max-width: 1280px) {
    .container { gap: 16px; }
    .card { padding: 20px 16px; }
    .header h1 { font-size: 34px; }
    #jam { font-size: 54px; }
    .container table tr td { font-size: 16px; }
}

/* 3. MOBILE TABLET / HP LANDSCAPE (768px - 1023px) */
@media (max-width: 1023px) {
    .container { grid-template-columns: 1fr; }
    .admin-container { grid-template-columns: 1fr; }
    .card { height: auto; }
    #jam { font-size: 50px; }
    .form-inline { flex-direction: column; align-items: stretch; }
}

/* 4. HP / SMARTPHONE (≤ 768px) */
@media (max-width: 768px) {
    body { padding: 12px; }
    .header { padding: 20px 14px; }
    .header h1 { font-size: 24px; letter-spacing: 1px; }
    .header p { font-size: 15px; }
    .card h2 { font-size: 20px; }
    .container table tr td { font-size: 15px; padding: 10px 4px; }
    .badge { font-size: 12px; padding: 4px 8px; }
    #jam { font-size: 42px; }
    #tanggal { font-size: 16px; }
    .besar { padding: 16px; }
    .besar h2 { font-size: 20px !important; }
    .besar table tr td { font-size: 16px !important; padding: 12px 6px; }
    .footer-content { font-size: 16px; }
}


/* ===================================================
   PERAPISAN TABEL KHUSUS TAMPILAN HP (MOBILE ONLY)
   =================================================== */

@media (max-width: 600px) {
    /* 1. Atur tabel agar fleksibel dan tidak sesak */
    .container table tr {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 10px 0;
        border-bottom: 1px dashed #cbd5e1;
    }

    .container table tr td {
        border-bottom: none !important;
        padding: 0 4px !important;
    }

    /* 2. Biarkan Nama Kapal mengambil sisa ruang */
    .container table td:nth-child(2) {
        flex: 1;
        font-size: 14px !important;
        white-space: normal !important; /* Agar nama kapal panjang tidak terpotong */
        word-break: break-word;
        padding-right: 8px !important;
    }

    /* 3. Rapikan Badge Retribusi bertumpuk rapi di kanan */
    .container table td:nth-child(3),
    .container table td:last-child {
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 3px;
    }

    /* 4. Ukuran Badge lebih ringkas khusus di HP */
    .badge {
        font-size: 11px !important;
        padding: 3px 8px !important;
        border-radius: 8px !important;
        text-align: center;
    }

    /* 5. Rapikan ukuran Card & Header HP */
    .card {
        padding: 16px 12px !important;
    }

    #jam {
        font-size: 38px !important;
    }
}