/* ========================================
   My Trips Dashboard Styles
   ======================================== */

.dashboard-page {
    min-height: 100vh;
    padding-top: 80px;
    background: var(--color-cream);
}

/* ── Profile Header ── */
.dash-profile {
    background: linear-gradient(135deg, var(--color-primary) 0%, #1a2a38 100%);
    padding: 3rem 2rem 2.5rem;
}

.dash-profile-inner {
    max-width: var(--content-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.dash-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: var(--color-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dash-avatar span {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-white);
    font-family: var(--font-heading);
}

.dash-profile-info {
    flex: 1;
    min-width: 200px;
}

.dash-profile-info h1 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 500;
    color: var(--color-white);
    margin-bottom: 0.1rem;
}

.dash-subtitle {
    color: rgba(255,255,255,0.6);
    font-size: 0.88rem;
}

.dash-stats {
    display: flex;
    gap: 2rem;
}

.dash-stat {
    text-align: center;
}

.dash-stat-num {
    display: block;
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-white);
    font-family: var(--font-heading);
}

.dash-stat-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.55);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Tabs ── */
.dash-content {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 2rem 4rem;
}

.dash-tabs {
    display: flex;
    gap: 0.25rem;
    margin: -1.5rem 0 2rem;
    background: var(--color-white);
    border-radius: 12px;
    padding: 0.35rem;
    box-shadow: var(--shadow-md);
    width: fit-content;
}

.dash-tab {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.3rem;
    border: none;
    background: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-light);
    cursor: pointer;
    transition: var(--transition-fast);
}

.dash-tab:hover {
    background: var(--color-light-gray);
    color: var(--color-text);
}

.dash-tab.active {
    background: var(--color-primary);
    color: var(--color-white);
}

.dash-tab svg {
    opacity: 0.7;
}

/* ── Sub-filters (Ongoing / Upcoming / Past) ── */
.dash-subfilters {
    display: flex;
    gap: 0.25rem;
    margin: -1.5rem 0 2rem;
    background: var(--color-white);
    border-radius: 10px;
    padding: 0.35rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    width: fit-content;
}

.dash-subfilter {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.6rem 1.3rem;
    border: none;
    background: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-light);
    cursor: pointer;
    transition: var(--transition-fast);
}

.dash-subfilter:hover {
    background: var(--color-light-gray);
    color: var(--color-text);
}

.dash-subfilter.active {
    background: var(--color-primary);
    color: var(--color-white);
}

/* ── Trip Cards Grid ── */
.dash-trips {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

.trip-card {
    background: var(--color-white);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-normal);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

.trip-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.trip-card-cover {
    height: 180px;
    background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
    position: relative;
    overflow: hidden;
}

.trip-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: auto;
}

.trip-card-status {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.trip-card-status.upcoming {
    background: rgba(46, 204, 113, 0.9);
    color: #fff;
}

.trip-card-status.ongoing {
    background: rgba(52, 152, 219, 0.9);
    color: #fff;
}

.trip-card-status.past {
    background: rgba(149, 165, 166, 0.85);
    color: #fff;
}

.trip-card-body {
    padding: 1.2rem 1.4rem;
}

.trip-card-body h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.25rem;
}

.trip-card-dest {
    font-size: 0.82rem;
    color: var(--color-secondary);
    font-weight: 500;
    margin-bottom: 0.6rem;
}

.trip-card-dates {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.trip-card-dates svg {
    flex-shrink: 0;
    opacity: 0.5;
}

.trip-card-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid var(--color-border);
}

.trip-card-meta span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.trip-card-actions {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 0.4rem;
    opacity: 0;
    transition: var(--transition-fast);
}

.trip-card:hover .trip-card-actions {
    opacity: 1;
}

.trip-card-action {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.trip-card-action:hover {
    background: var(--color-white);
    transform: scale(1.1);
}

.trip-card-action svg {
    width: 14px;
    height: 14px;
}

/* ── Empty State ── */
.dash-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-muted);
}

.dash-empty svg {
    margin-bottom: 1.2rem;
    opacity: 0.3;
}

.dash-empty h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--color-text-light);
    margin-bottom: 0.4rem;
}

.dash-empty p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.btn-add-trip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-add-trip:hover {
    background: #1a2a38;
}

/* ── FAB ── */
.fab-add {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
    z-index: 100;
}

.fab-add:hover {
    background: #1a2a38;
    transform: scale(1.08);
}

/* ── Album Editor (Lupa-style full screen) ── */
.album-editor-overlay {
    position: fixed;
    inset: 0;
    background: #faf8f5;
    z-index: 2000;
    display: flex;
    flex-direction: column;
}

.album-editor-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 1.5rem;
    background: var(--color-primary);
    flex-shrink: 0;
    gap: 1rem;
}

.album-editor-name-input {
    flex: 1;
    max-width: 380px;
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 0.5rem 1rem;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.35rem;
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.album-editor-name-input::placeholder { color: rgba(255,255,255,0.45); }
.album-editor-name-input:focus { border-color: rgba(255,255,255,0.65); background: rgba(255,255,255,0.22); }

.album-editor-header-actions { display: flex; gap: 0.6rem; flex-shrink: 0; }

.album-editor-cancel {
    padding: 0.5rem 1.1rem;
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.35);
    border-radius: 7px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
}
.album-editor-cancel:hover { background: rgba(255,255,255,0.25); }

.album-editor-save {
    padding: 0.5rem 1.2rem;
    background: var(--color-accent);
    border: none;
    border-radius: 7px;
    color: #fff;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s;
}
.album-editor-save:hover { background: #c49060; transform: translateY(-1px); }

.album-editor-body {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Left: Photo Library */
.album-editor-library {
    width: 300px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 2px solid #e8e3dc;
    background: #fff;
}

.album-library-header {
    padding: 0.9rem 1.1rem 0.7rem;
    border-bottom: 1px solid #e8e3dc;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.album-library-header h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
}

.album-library-header span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.album-library-photos {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0.75rem 1.5rem;
}

.album-lib-trip-label {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    padding: 0.6rem 0.25rem 0.3rem;
    margin-top: 0.2rem;
}

.album-lib-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}

.album-lib-thumb {
    aspect-ratio: 1;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 2.5px solid transparent;
    transition: border-color 0.15s, transform 0.1s;
}

.album-lib-thumb:hover { transform: scale(1.04); }
.album-lib-thumb.selected { border-color: var(--color-accent); }
.album-lib-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

.album-lib-check {
    position: absolute;
    top: 3px; right: 3px;
    width: 17px; height: 17px;
    background: var(--color-accent);
    border-radius: 50%;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.album-lib-empty {
    padding: 2rem 1rem;
    text-align: center;
    color: #bbb;
    font-size: 0.83rem;
    line-height: 1.6;
}

/* Right: Album Book */
.album-editor-book {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #f0ebe3;
    min-width: 0;
}

.album-book-header {
    padding: 0.9rem 1.5rem 0.7rem;
    border-bottom: 1px solid #ddd8cf;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    flex-shrink: 0;
}

.album-book-header h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
}

.album-book-header span {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

.album-book-pages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.1rem;
    align-content: start;
}

.album-book-photo {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: visible;
    position: relative;
    cursor: grab;
    box-shadow: 0 4px 14px rgba(0,0,0,0.16);
    background: #fff;
    transition: transform 0.15s, box-shadow 0.15s;
}

.album-book-photo:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(0,0,0,0.22); }
.album-book-photo.dragging { opacity: 0.45; cursor: grabbing; }

.album-book-photo img {
    width: 100%; height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.album-book-num {
    position: absolute;
    bottom: -9px; left: -9px;
    width: 22px; height: 22px;
    background: var(--color-primary);
    border-radius: 50%;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 5px rgba(0,0,0,0.3);
    pointer-events: none;
}

.album-book-remove {
    position: absolute;
    top: -9px; right: -9px;
    width: 22px; height: 22px;
    background: #e74c3c;
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
    box-shadow: 0 1px 5px rgba(0,0,0,0.3);
    padding: 0;
}

.album-book-photo:hover .album-book-remove { opacity: 1; }

.album-book-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: #c0b8ae;
    gap: 0.75rem;
    text-align: center;
}

.album-book-empty p { font-size: 0.88rem; line-height: 1.6; }

/* ── Modal ── */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-card {
    background: var(--color-white);
    border-radius: 16px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 1.8rem 0;
}

.modal-header h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--color-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.3rem;
    line-height: 1;
}

.modal-close:hover {
    color: var(--color-text);
}

.modal-card form {
    padding: 1.5rem 1.8rem 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-card .form-group label {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--color-text);
}

.modal-card .form-group input,
.modal-card .form-group textarea {
    padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    color: var(--color-text);
    width: 100%;
    transition: var(--transition-fast);
}

.modal-card .form-group input:focus,
.modal-card .form-group textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(139, 115, 85, 0.1);
}

.modal-card .form-group textarea {
    resize: vertical;
    min-height: 60px;
}

.modal-card .form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.btn-primary {
    padding: 0.65rem 1.5rem;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-primary:hover {
    background: #1a2a38;
}

.btn-secondary {
    padding: 0.65rem 1.5rem;
    background: none;
    color: var(--color-text-light);
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.btn-secondary:hover {
    background: var(--color-light-gray);
}

/* ── User Nav Menu ── */
.nav-user-menu {
    position: relative;
}

.nav-user-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    color: var(--color-text);
}

.nav-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-secondary);
    color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.nav-user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
}

.nav-user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--color-white);
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    min-width: 160px;
    overflow: hidden;
    display: none;
    z-index: 500;
}

.nav-user-dropdown.show {
    display: block;
}

.nav-user-dropdown a {
    display: block;
    padding: 0.7rem 1.2rem;
    font-size: 0.85rem;
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition-fast);
}

.nav-user-dropdown a:hover {
    background: var(--color-light-gray);
    color: var(--color-secondary);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .dash-profile-inner {
        flex-direction: column;
        text-align: center;
    }

    .dash-stats {
        justify-content: center;
    }

    .dash-content {
        padding: 0 1rem 3rem;
    }

    .dash-tabs {
        margin: -1.2rem auto 1.5rem;
    }

    .dash-trips {
        grid-template-columns: 1fr;
    }

    .modal-card .form-row-2col {
        grid-template-columns: 1fr;
    }
}
