/* css/admin.css - Admin Portal and Dashboard Styles */

/* Base Layouts & Variables Overrides */
body {
    background-color: var(--bg-dark);
    color: var(--text-gray-100);
}

.w-full {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.badge {
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
    vertical-align: middle;
    text-transform: uppercase;
}

/* =========================================
   AUTHENTICATION VIEW
   ========================================= */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1.5rem;
    background: radial-gradient(circle at center, #1a0a0a 0%, var(--bg-dark) 70%);
}

.login-card {
    width: 100%;
    max-width: 420px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(16px);
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
}

.login-title {
    font-family: "Jost", sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.25rem;
}

.login-subtitle {
    font-size: 0.875rem;
    color: var(--text-gray-400);
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-gray-400);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.password-toggle:hover {
    color: var(--text-white);
}

.password-toggle i,
.password-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* =========================================
   DASHBOARD WRAPPER & TOP NAV
   ========================================= */
.dashboard-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-nav {
    background-color: var(--bg-nav);
    border-bottom: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-logo-small {
    height: 36px;
    width: auto;
}

.admin-nav-title {
    font-family: "Jost", sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    display: flex;
    align-items: center;
}

.admin-nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* =========================================
   DASHBOARD MAIN CONTAINER
   ========================================= */
.admin-main {
    flex: 1;
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.admin-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.admin-title {
    font-family: "Jost", sans-serif;
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 0.35rem;
}

.admin-subtitle {
    color: var(--text-gray-400);
    font-size: 0.95rem;
}

/* =========================================
   STATS WIDGETS
   ========================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, border-color 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-light);
}

.stat-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.5rem;
}

.stat-icon-wrapper i,
.stat-icon-wrapper svg {
    width: 1.75rem;
    height: 1.75rem;
}

.stat-icon-wrapper.blue {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.stat-icon-wrapper.green {
    background-color: rgba(34, 197, 94, 0.1);
    color: #22c55e;
}

.stat-icon-wrapper.red {
    background-color: rgba(220, 38, 38, 0.1);
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.stat-value {
    font-family: "Jost", sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-white);
}

/* =========================================
   FORM ELEMENTS & INPUTS
   ========================================= */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-family: "Jost", sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-gray-400);
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.input-field {
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    padding: 0.75rem 1rem;
    color: var(--text-white);
    width: 100%;
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.input-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 1px var(--primary-color);
}

.input-field::placeholder {
    color: var(--text-gray-600);
}

/* =========================================
   SEARCH & FILTERS
   ========================================= */
.filters-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
}

.filters-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 1.25rem;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1rem;
    color: var(--text-gray-500);
    width: 1.25rem;
    height: 1.25rem;
}

.search-input-wrapper .input-field {
    padding-left: 2.75rem;
}

.select-field {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%239ca3af'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.select-field option {
    background-color: var(--bg-card);
    color: var(--text-gray-100);
}

/* =========================================
   DATA TABLE LISTING
   ========================================= */
.data-table-container {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    background-color: var(--bg-alt);
    color: var(--text-gray-300);
    font-family: "Jost", sans-serif;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.925rem;
    color: var(--text-gray-200);
    vertical-align: middle;
}

.data-table tbody tr {
    transition: background-color 0.2s;
}

.data-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.02);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.text-right {
    text-align: right;
}

.booking-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.btn-icon {
    background-color: var(--bg-alt);
    border: 1px solid var(--border-color);
    color: var(--text-gray-300);
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    border-color: var(--border-light);
    color: var(--text-white);
    background-color: var(--bg-card);
}

.btn-icon.btn-view-detail:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}

.btn-icon.btn-delete-booking:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-icon i,
.btn-icon svg {
    width: 1.1rem;
    height: 1.1rem;
}

.no-data-card {
    padding: 5rem 2rem;
    text-align: center;
    color: var(--text-gray-500);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.no-data-card i,
.no-data-card svg {
    width: 3.5rem;
    height: 3.5rem;
    stroke-width: 1.5;
}

.no-data-card h3 {
    color: var(--text-gray-300);
    font-family: "Jost", sans-serif;
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

/* =========================================
   DETAILS DRAWER SLIDE PANEL
   ========================================= */
.drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 150;
    visibility: hidden;
    transition: visibility 0.3s;
}

.drawer.is-open {
    visibility: visible;
}

.drawer-backdrop {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s;
}

.drawer.is-open .drawer-backdrop {
    opacity: 1;
}

.drawer-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-width: 580px;
    background-color: var(--bg-card);
    border-left: 1px solid var(--border-color);
    box-shadow: -10px 0 25px -5px rgba(0, 0, 0, 0.5);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

.drawer.is-open .drawer-content {
    transform: translateX(0);
}

.drawer-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--bg-alt);
}

.drawer-title {
    font-family: "Jost", sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
}

.drawer-close-btn {
    background: none;
    border: none;
    color: var(--text-gray-400);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.drawer-close-btn:hover {
    color: var(--text-white);
}

.drawer-close-btn i,
.drawer-close-btn svg {
    width: 1.5rem;
    height: 1.5rem;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Detail Info Cards & Lists */
.detail-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.detail-section-title {
    font-family: "Jost", sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-item.full-width {
    grid-column: span 2;
}

.detail-label {
    font-size: 0.775rem;
    color: var(--text-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-value {
    font-size: 0.95rem;
    color: var(--text-gray-100);
}

.detail-value.price {
    font-family: monospace;
    font-weight: 600;
    color: var(--text-white);
}

.detail-photos {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.photo-preview-box {
    background-color: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.photo-preview-header {
    padding: 0.75rem 1rem;
    background-color: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.photo-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-gray-300);
}

.btn-download-photo {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 0.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: color 0.2s;
    padding: 0;
}

.btn-download-photo:hover {
    color: var(--primary-hover);
}

.btn-download-photo i,
.btn-download-photo svg {
    width: 0.9rem;
    height: 0.9rem;
}

.photo-img-wrapper {
    width: 100%;
    max-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle, #222 0%, #111 100%);
    overflow: hidden;
}

.photo-img-wrapper img {
    max-width: 100%;
    max-height: 320px;
    object-fit: contain;
}

.photo-placeholder {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-gray-500);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.photo-placeholder i,
.photo-placeholder svg {
    width: 2rem;
    height: 2rem;
}

/* =========================================
   MODAL DIALOGS
   ========================================= */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    overflow-y: auto;
}

.modal.is-open {
    display: block;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.modal-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
    text-align: center;
}

.modal-container {
    display: inline-block;
    vertical-align: middle;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    text-align: left;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    max-width: 42rem;
    width: 100%;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    z-index: 210;
}

.modal.is-open .modal-container {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-alt);
}

.modal-title {
    font-family: "Jost", sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-white);
    letter-spacing: 0.1em;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

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

.modal-close i,
.modal-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

.modal-body {
    padding: 2rem;
}

.modal-container.modal-sm {
    max-width: 440px;
}

.warning-icon {
    width: 3.5rem;
    height: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    stroke-width: 1.5;
}

.confirm-message {
    color: var(--text-gray-300);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 2rem;
}

.confirm-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.btn-danger {
    background-color: var(--primary-color);
    color: var(--text-white);
    border: 1px solid var(--primary-color);
    padding: 0.75rem 1.5rem;
    font-family: "Jost", sans-serif;
    font-weight: 500;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.btn-danger:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* =========================================
   RESPONSIVE OVERRIDES
   ========================================= */
@media (max-width: 1024px) {
    .filters-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .admin-main {
        padding: 1.5rem 1rem;
    }

    .admin-header-row {
        flex-direction: column;
        align-items: stretch;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-item.full-width {
        grid-column: span 1;
    }
}