/* assets/css/style.css */

/* ========== VARIABEL ========== */
:root {
    --bg-gradient: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 40%, #f9a8d4 100%);
    --glass-bg: rgba(255, 255, 255, 0.18);
    --glass-bg-strong: rgba(255, 255, 255, 0.32);
    --glass-border: rgba(255, 255, 255, 0.6);
    --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.28);
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --radius-full: 999px;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --accent: #f97316;
    --accent-soft: rgba(249, 115, 22, 0.12);
    --accent-2: #06b6d4;
    --danger: #ef4444;
    --success: #22c55e;
    --border-subtle: rgba(148, 163, 184, 0.25);
}

/* ========== GLOBAL ========== */
*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-gradient);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-main);
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ========== HEADER ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--glass-border);
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    width: 36px;
    height: 36px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.logo-title {
    font-weight: 700;
    font-size: 0.95rem;
}

.logo-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ========== BUTTON ========== */
.btn {
    border-radius: var(--radius-full);
    padding: 0.45rem 1.1rem;
    font-size: 0.85rem;
    border: 1px solid transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    white-space: nowrap;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease, border-color 0.15s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: linear-gradient(135deg, #f97316, #fb7185);
    color: #ffffff;
    border-color: rgba(248, 250, 252, 0.7);
    box-shadow: 0 12px 25px rgba(248, 113, 113, 0.4);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(148, 163, 184, 0.5);
    color: var(--text-main);
}

.btn-wa {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #ffffff;
    border-color: rgba(240, 253, 250, 0.8);
    box-shadow: 0 10px 20px rgba(34, 197, 94, 0.45);
}

.btn-full {
    width: 100%;
}

.btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ========== LAYOUT ========== */
.page {
    padding: 1.5rem 1rem 2.5rem;
}

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.page-title {
    font-size: 1.6rem;
    margin: 0 0 0.35rem;
}

.page-subtitle {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ========== GLASS CARD ========== */
.glass-card,
.glass {
    background: var(--glass-bg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-soft);
}

/* ========== SEARCH BAR ========== */
.search-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.9rem;
    margin-bottom: 1.5rem;
}

.search-bar input[type="text"] {
    flex: 1;
    border-radius: var(--radius-full);
    border: 1px solid var(--border-subtle);
    padding: 0.5rem 0.9rem;
    background: rgba(255, 255, 255, 0.65);
    outline: none;
    font-size: 0.85rem;
}

.search-bar input[type="text"]:focus {
    border-color: var(--accent-2);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.3);
}

/* ========== GRID CARD HOME ========== */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.3rem;
}

.card-link {
    text-decoration: none;
}

.tour-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.card-image {
    position: relative;
    padding-top: 62%;
    overflow: hidden;
    border-radius: calc(var(--radius-lg) - 4px);
}

.card-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.card-body {
    padding: 0.9rem 0.95rem 1rem;
}

.card-title {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    font-weight: 600;
}

.card-city {
    margin: 0 0 0.4rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.card-price {
    margin: 0 0 0.35rem;
    font-size: 0.88rem;
}

.card-price span {
    font-weight: 600;
    color: var(--accent);
}

.card-desc {
    margin: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.tour-card:hover .card-image img {
    transform: scale(1.04);
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 1.7rem 1.4rem;
    border-radius: var(--radius-lg);
}

.empty-state h3 {
    margin: 0 0 0.35rem;
}

/* ========== DETAIL PAGE ========== */
.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 4fr);
    gap: 1.5rem;
    padding: 1.25rem;
}

.detail-left {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.detail-image {
    border-radius: var(--radius-md);
    overflow: hidden;
}

.detail-summary {
    padding: 0.7rem 0.3rem 0.5rem;
}

.detail-city {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.6rem;
    background: var(--accent-soft);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    color: var(--accent);
}

.detail-prices h3 {
    font-size: 0.95rem;
    margin: 0.75rem 0 0.4rem;
}

.price-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.price-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    font-size: 0.88rem;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.4);
}

.price-label {
    color: var(--text-muted);
}

.price-value {
    font-weight: 600;
    color: var(--accent);
}

.detail-right {
    padding: 0.4rem 0.6rem;
}

.detail-section + .detail-section {
    margin-top: 0.85rem;
}

.detail-section h2 {
    margin: 0 0 0.3rem;
    font-size: 1rem;
}

.detail-section p {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-main);
}

/* ========== ADMIN TABLE ========== */
.admin-table-wrapper {
    padding: 0.9rem;
    margin-top: 0.7rem;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.admin-table thead {
    background: rgba(255, 255, 255, 0.22);
}

.admin-table th,
.admin-table td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.3);
    text-align: left;
}

.admin-table th {
    font-weight: 600;
    font-size: 0.8rem;
}

.admin-actions {
    white-space: nowrap;
}

.link-small {
    font-size: 0.8rem;
    margin-right: 0.4rem;
    color: var(--accent-2);
}

.text-danger {
    color: var(--danger);
}

.empty-cell {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ========== FORM ========== */
.form-wrapper {
    padding: 1.2rem 1.1rem;
    margin-top: 0.4rem;
}

.form-group {
    margin-bottom: 0.9rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.form-group small {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

.form-group input[type="text"],
.form-group input[type="file"],
.form-group textarea {
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    padding: 0.45rem 0.7rem;
    background: rgba(255, 255, 255, 0.8);
    font-size: 0.85rem;
    outline: none;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--accent-2);
    box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.3);
}

.price-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.price-row {
    display: grid;
    grid-template-columns: 1.5fr 1.2fr;
    gap: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.8rem;
}

.current-image {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.4rem;
}

.current-image img {
    width: 90px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

.current-image-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ========== ALERTS ========== */
.alert {
    border-radius: var(--radius-md);
    padding: 0.6rem 0.8rem;
    font-size: 0.8rem;
    margin-bottom: 0.7rem;
    border: 1px solid transparent;
}

.alert.success {
    background: rgba(34, 197, 94, 0.09);
    border-color: rgba(22, 163, 74, 0.4);
    color: #166534;
}

.alert.error {
    background: rgba(248, 113, 113, 0.09);
    border-color: rgba(239, 68, 68, 0.45);
    color: #b91c1c;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .header {
        padding: 0.6rem 0.9rem;
        gap: 0.4rem;
    }

    .header-right {
        gap: 0.4rem;
    }

    .header-right .btn-ghost {
        display: none;
    }

    .page {
        padding: 1rem 0.8rem 2rem;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .price-row {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
