/* =============================================
   Daubipower — Warm Vacation Theme
   ============================================= */

:root {
    /* Warm vacation palette */
    --sand:        #f5e6d3;
    --sand-light:  #faf3eb;
    --sand-dark:   #e8d5bc;
    --coral:       #e07c4f;
    --coral-light: #f4a77e;
    --coral-dark:  #c4613a;
    --ocean:       #2b8a9e;
    --ocean-light: #6fc4d4;
    --ocean-dark:  #1e6a7a;
    --sunset:      #f0a030;
    --sunset-light:#f7c46c;
    --sunset-dark: #d08a20;
    --palm:        #5a9e5a;
    --palm-light:  #8cc68c;
    --white:       #ffffff;
    --text:        #3a2e26;
    --text-light:  #7a6e62;
    --danger:      #d94f4f;
    --danger-light:#f4a0a0;

    --radius:      12px;
    --radius-sm:   8px;
    --shadow:      0 4px 20px rgba(58,46,38,0.12);
    --shadow-lg:   0 8px 40px rgba(58,46,38,0.18);
    --transition:  0.2s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', sans-serif;
    background: linear-gradient(135deg, var(--sand-light) 0%, var(--sand) 50%, var(--sand-dark) 100%);
    color: var(--text);
    min-height: 100vh;
}

/* ---- Screens ---- */
.screen { display: none; }
.screen.active { display: block; }

/* ---- Login ---- */
#login-screen, #loading-screen, #pending-screen {
    display: none;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #fceabb 0%, #f8b500 30%, #e07c4f 70%, #c4613a 100%);
}
#login-screen.active, #loading-screen.active, #pending-screen.active {
    display: flex;
}

.login-container {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 3rem 2.5rem;
    width: 100%;
    max-width: 420px;
    text-align: center;
}

.login-brand .brand-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 0.5rem;
}

.login-brand h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--coral-dark);
    margin-bottom: 0.25rem;
}

.login-brand p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 2rem;
}

.login-form {
    text-align: left;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
    color: var(--text);
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 2px solid var(--sand-dark);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition);
    background: var(--sand-light);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--coral);
    background: var(--white);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 600;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--coral);
}

/* ---- Buttons ---- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem 1.4rem;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-primary {
    background: linear-gradient(135deg, var(--coral), var(--coral-dark));
    color: var(--white);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--coral-light), var(--coral));
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(224,124,79,0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--coral);
    color: var(--coral-dark);
}
.btn-outline:hover {
    background: var(--coral);
    color: var(--white);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}
.btn-danger:hover {
    background: #b33e3e;
}

/* Auth tabs */
.auth-tabs {
    display: flex;
    border-radius: var(--radius-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
    border: 2px solid var(--sand-dark);
}
.auth-tab {
    flex: 1;
    padding: 0.6rem;
    border: none;
    background: var(--sand-light);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s;
    font-family: inherit;
    color: var(--text-light);
}
.auth-tab.active {
    background: var(--coral);
    color: var(--white);
}

/* Social login */
.social-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-size: 0.85rem;
}
.social-divider::before, .social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sand-dark);
}
.social-divider span {
    padding: 0 1rem;
}
.social-buttons {
    display: flex;
    gap: 0.75rem;
}
.btn-social {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: 2px solid var(--sand-dark);
    background: var(--white);
    color: var(--text);
    transition: background 0.2s, border-color 0.2s;
    font-family: inherit;
}
.btn-social:hover {
    background: var(--sand-light);
    border-color: var(--text-light);
}

/* Loading spinner */
.spinner {
    width: 36px;
    height: 36px;
    border: 4px solid var(--sand-dark);
    border-top-color: var(--coral);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 1.5rem auto 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-icon {
    background: var(--sand);
    border: 2px solid var(--sand-dark);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-icon:hover {
    background: var(--coral);
    color: var(--white);
    border-color: var(--coral);
}

.btn-sm {
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
}

.btn-block {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.05rem;
    margin-top: 0.5rem;
}

/* ---- Error ---- */
.error-msg {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 0.75rem;
    text-align: center;
    font-weight: 600;
}

.hidden { display: none !important; }

/* ---- Navbar ---- */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--coral-dark), var(--coral));
    color: var(--white);
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.brand-icon-sm { font-size: 1.5rem; }
.brand-name {
    font-size: 1.3rem;
    font-weight: 800;
}

.navbar-links {
    display: flex;
    gap: 0.25rem;
}

.nav-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
}
.nav-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.nav-btn.active { background: rgba(255,255,255,0.25); color: #fff; }

.navbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 0.9rem;
}

#logout-btn {
    border-color: rgba(255,255,255,0.5);
    color: var(--white);
}
#logout-btn:hover {
    background: var(--white);
    color: var(--coral-dark);
}

/* ---- Views ---- */
.view { display: none; padding: 1.5rem 2rem; max-width: 1200px; margin: 0 auto; }
.view.active { display: block; }

.view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.view-header h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--coral-dark);
}

/* ---- Property Selector ---- */
.property-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.property-selector label {
    font-weight: 700;
    font-size: 0.95rem;
}

.property-selector select {
    padding: 0.5rem 1rem;
    border: 2px solid var(--coral-light);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-weight: 600;
    font-size: 0.95rem;
    background: var(--white);
    cursor: pointer;
    min-width: 220px;
}

/* ---- Calendar Controls ---- */
.calendar-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.calendar-controls h3 {
    font-size: 1.25rem;
    font-weight: 700;
    min-width: 200px;
    text-align: center;
    color: var(--ocean-dark);
}

/* ---- Calendar Legend ---- */
.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(0,0,0,0.1);
}
.legend-color.free { background: var(--white); }
.legend-color.mine { background: var(--ocean-light); }
.legend-color.other { background: var(--sunset-light); }
.legend-color.today-marker { background: var(--coral); }

/* ---- Calendar Grid ---- */
.calendar-dual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    background: var(--white);
    border-radius: var(--radius);
    padding: 0.75rem;
    box-shadow: var(--shadow);
}

.cal-month-title {
    grid-column: 1 / -1;
    text-align: center;
    font-weight: 800;
    font-size: 1rem;
    color: var(--ocean-dark);
    padding: 0.4rem 0 0.6rem;
    border-bottom: 2px solid var(--sand-dark);
    margin-bottom: 0.3rem;
}

.cal-header {
    text-align: center;
    font-weight: 800;
    font-size: 0.75rem;
    padding: 0.35rem;
    color: var(--coral-dark);
    text-transform: uppercase;
}

.cal-day {
    position: relative;
    text-align: center;
    padding: 0.3rem 0.15rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all var(--transition);
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1px;
}

.cal-day .day-number {
    font-weight: 700;
    font-size: 0.8rem;
}

.cal-day:hover {
    background: var(--sand);
    transform: scale(1.05);
}

.cal-day.empty {
    cursor: default;
}
.cal-day.empty:hover {
    background: transparent;
    transform: none;
}

.cal-day.today {
    border: 2px solid var(--coral);
    font-weight: 800;
}

.cal-day.reserved-mine {
    background: var(--ocean-light);
    color: var(--white);
    border-radius: var(--radius-sm);
}

.cal-day.reserved-other {
    background: var(--sunset-light);
    color: var(--text);
    border-radius: var(--radius-sm);
}

.cal-day .res-label {
    font-size: 0.55rem;
    font-weight: 700;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.1;
}

.cal-day .res-note-inline {
    font-size: 0.5rem;
    font-weight: 600;
    font-style: italic;
    opacity: 0.85;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.1;
}

.cal-day.past {
    opacity: 0.5;
}

/* ---- Modal ---- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(58,46,38,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    backdrop-filter: blur(3px);
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 95%;
    max-width: 480px;
    overflow: hidden;
    animation: modalIn 0.25s ease;
}

@keyframes modalIn {
    from { transform: translateY(30px) scale(0.95); opacity: 0; }
    to { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--coral), var(--coral-dark));
    color: var(--white);
}

.modal-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.6rem;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 1.5rem;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

/* ---- Reservations List ---- */
.reservations-list {
    display: grid;
    gap: 1rem;
}

.reservation-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform var(--transition);
    border-left: 5px solid var(--ocean);
}

.reservation-card:hover {
    transform: translateX(4px);
}

.reservation-card .res-icon {
    font-size: 2rem;
}

.reservation-card .res-details {
    flex: 1;
}

.reservation-card .res-property {
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--coral-dark);
}

.reservation-card .res-dates {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.2rem;
}

.reservation-card .res-note {
    color: var(--ocean-dark);
    font-size: 0.85rem;
    margin-top: 0.2rem;
    font-style: italic;
}

.reservation-card .res-actions {
    display: flex;
    gap: 0.5rem;
}

/* ---- Admin ---- */
.admin-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--sand-dark);
    padding-bottom: 0;
}

.admin-tab {
    padding: 0.6rem 1.25rem;
    background: transparent;
    border: none;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-light);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -3px;
    transition: all var(--transition);
}
.admin-tab:hover { color: var(--coral); }
.admin-tab.active {
    color: var(--coral-dark);
    border-bottom-color: var(--coral);
}

.admin-panel { display: none; }
.admin-panel.active { display: block; }

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.panel-header h3 {
    font-size: 1.15rem;
    color: var(--ocean-dark);
}

.admin-list {
    display: grid;
    gap: 0.75rem;
}

.admin-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform var(--transition);
}
.admin-card:hover {
    transform: translateX(4px);
}

.admin-card .card-icon {
    font-size: 2rem;
}

.admin-card .card-info {
    flex: 1;
}

.admin-card .card-title {
    font-weight: 800;
    font-size: 1rem;
    color: var(--coral-dark);
}

.admin-card .card-subtitle {
    font-size: 0.85rem;
    color: var(--text-light);
}

.admin-card .card-actions {
    display: flex;
    gap: 0.5rem;
}

.admin-card .card-actions button {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
}

/* ---- Access Matrix ---- */
.access-matrix {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow-x: auto;
}

.access-matrix table {
    width: 100%;
    border-collapse: collapse;
}

.access-matrix th,
.access-matrix td {
    padding: 0.75rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--sand-dark);
}

.access-matrix th {
    background: var(--sand);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--coral-dark);
}

.access-matrix td:first-child,
.access-matrix th:first-child {
    text-align: left;
    font-weight: 700;
}

.access-matrix input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--coral);
    cursor: pointer;
}

/* ---- Help Text ---- */
.help-text {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    font-style: italic;
}

/* ---- Toast ---- */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--ocean-dark);
    color: var(--white);
    padding: 0.85rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: var(--shadow-lg);
    z-index: 999;
    animation: toastIn 0.3s ease, toastOut 0.3s ease 2.7s forwards;
}

@keyframes toastIn {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}
@keyframes toastOut {
    from { opacity: 1; }
    to { opacity: 0; transform: translateY(20px); }
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state .empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.75rem;
}

.empty-state p {
    font-size: 1rem;
    font-weight: 600;
}

/* ---- Member badge in modal ---- */
.member-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #fff;
    margin: 0.15rem;
}

/* ---- Location Selection Screen ---- */
#location-screen {
    display: none;
    min-height: 100vh;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #fceabb 0%, #f8b500 30%, #e07c4f 70%, #c4613a 100%);
}
#location-screen.active {
    display: flex;
}

.location-select-container {
    text-align: center;
    width: 100%;
    max-width: 720px;
    padding: 2rem;
}

.location-header {
    margin-bottom: 2rem;
}

.location-header .brand-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.5rem;
}

.location-header h1 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 0.25rem;
}

.location-header p {
    color: rgba(255,255,255,0.9);
    font-size: 1.05rem;
    font-weight: 600;
}

.location-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.location-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.location-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 40px rgba(58,46,38,0.25);
}

.location-card-icon {
    font-size: 3.5rem;
    display: block;
    margin-bottom: 0.75rem;
}

.location-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-bottom: 0.75rem;
}

.navbar-loc-img {
    width: 22px;
    height: 22px;
    object-fit: cover;
    border-radius: 4px;
    vertical-align: middle;
    margin-right: 0.25rem;
}

.location-card-name {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--coral-dark);
    margin-bottom: 0.35rem;
}

.location-card-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.location-card-info {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--ocean-dark);
}

.location-footer {
    margin-top: 1rem;
}

.location-footer .btn {
    border-color: rgba(255,255,255,0.6);
    color: var(--white);
}
.location-footer .btn:hover {
    background: var(--white);
    color: var(--coral-dark);
}

/* ---- Navbar location badge ---- */
.navbar-location-badge {
    background: rgba(255,255,255,0.2);
    padding: 0.2rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* ---- Document Spaces ---- */
.doc-spaces-container {
    display: grid;
    gap: 1.5rem;
}

.doc-space-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.doc-space-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--ocean-dark), var(--ocean));
    color: var(--white);
    gap: 1rem;
}

.doc-space-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.doc-space-icon {
    font-size: 1.8rem;
}

.doc-space-title h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.1rem;
}

.doc-space-desc {
    font-size: 0.8rem;
    opacity: 0.85;
    font-weight: 600;
}

.doc-space-link {
    font-size: 0.75rem;
    opacity: 0.7;
    font-weight: 600;
}

.doc-space-actions .doc-upload-btn {
    cursor: pointer;
}

.doc-space-actions .doc-upload-btn input[type="file"] {
    display: none;
}

.doc-list {
    padding: 0.75rem 1.25rem;
    max-height: 400px;
    overflow-y: auto;
}

.doc-empty {
    color: var(--text-light);
    font-style: italic;
    font-size: 0.9rem;
    padding: 1rem 0;
    text-align: center;
}

.doc-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--sand-dark);
    transition: background var(--transition);
}

.doc-row:last-child {
    border-bottom: none;
}

.doc-row:hover {
    background: var(--sand-light);
    margin: 0 -0.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    border-radius: var(--radius-sm);
}

.doc-file-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.doc-file-info {
    flex: 1;
    min-width: 0;
}

.doc-file-name {
    display: block;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.doc-file-meta {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 600;
}

.doc-file-actions {
    display: flex;
    gap: 0.35rem;
    flex-shrink: 0;
}

.doc-space-footer {
    padding: 0.5rem 1.25rem;
    background: var(--sand-light);
    border-top: 1px solid var(--sand-dark);
}

.doc-count {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-light);
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .calendar-dual {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
    .calendar-grid { padding: 0.5rem; gap: 2px; }
    .cal-day { min-height: 48px; font-size: 0.75rem; }
    .cal-day .res-note-inline { font-size: 0.45rem; }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    .navbar-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    .nav-btn { padding: 0.4rem 0.7rem; font-size: 0.8rem; }
    .view { padding: 0.75rem; }
    .view-header { flex-direction: column; align-items: flex-start; }
    .calendar-dual {
        grid-template-columns: 1fr;
    }
    .calendar-grid { gap: 2px; padding: 0.5rem; }
    .cal-day { padding: 0.25rem 0.1rem; font-size: 0.75rem; min-height: 44px; }
    .cal-day .res-label { font-size: 0.5rem; }
    .cal-day .res-note-inline { font-size: 0.45rem; }
    .cal-month-title { font-size: 0.9rem; }
    .form-row { grid-template-columns: 1fr; }
    .admin-tabs { flex-wrap: wrap; }
    .reservation-card { flex-direction: column; align-items: flex-start; }
    .property-selector { flex-direction: column; align-items: flex-start; }
    .property-selector select { min-width: 100%; }
    .calendar-controls h3 { font-size: 1rem; min-width: auto; }
    .location-cards { grid-template-columns: 1fr; }
    .location-select-container { padding: 1rem; }
    .doc-space-header { flex-direction: column; align-items: flex-start; }
    .doc-row { flex-wrap: wrap; }
    .navbar-location-badge { display: none; }
}

@media (max-width: 480px) {
    .login-container { padding: 2rem 1.5rem; }
    .calendar-dual { gap: 0.5rem; }
    .cal-day { min-height: 40px; padding: 0.2rem 0.05rem; }
    .cal-header { font-size: 0.65rem; padding: 0.25rem; }
    .cal-day .res-note-inline { display: none; }
    .navbar-user span { display: none; }
}

/* =============================================
   Access Request / Approval  — Phase 7
   ============================================= */

/* Locked location cards */
.location-card-locked {
    opacity: 0.65;
    border: 2px dashed var(--text-light);
    cursor: default;
}
.location-card-locked:hover {
    transform: none;
    box-shadow: var(--shadow);
}

.location-card-empty {
    border: 2px dashed var(--sand-dark);
    cursor: default;
    text-align: center;
}
.location-card-empty:hover {
    transform: none;
}

/* Request pending badge on location card */
.request-pending-badge {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.35rem 0.8rem;
    background: var(--sunset-light);
    color: var(--text);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
}

/* Location request section */
.location-request-section {
    margin-top: 2rem;
    text-align: center;
}
.location-request-title {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}
.location-request-desc {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Access request modal extras */
.ar-location-label {
    font-size: 1.05rem;
    margin-bottom: 1rem;
}
.ar-property-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
}
.mem-access-location {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
}
.mem-access-location > strong {
    font-size: 0.9rem;
    color: var(--ocean-dark);
    margin-bottom: 0.15rem;
}
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--sand-light);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.2s;
}
.checkbox-label:hover {
    background: var(--sand-dark);
}
.checkbox-label input[type="checkbox"] {
    accent-color: var(--ocean);
    width: 1.1rem;
    height: 1.1rem;
}

/* Admin badge (notification count) */
.admin-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.3rem;
    height: 1.3rem;
    padding: 0 0.35rem;
    background: var(--danger);
    color: var(--white);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 0.3rem;
    vertical-align: middle;
}

/* Admin request cards */
.admin-request-card {
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--text-light);
    box-shadow: 0 2px 8px rgba(58,46,38,0.07);
}
.admin-request-card.status-pending {
    border-left-color: var(--sunset);
    background: #fffcf5;
}
.admin-request-card.status-approved {
    border-left-color: var(--palm);
}
.admin-request-card.status-rejected {
    border-left-color: var(--danger);
    opacity: 0.7;
}

.admin-request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.admin-request-status {
    font-size: 0.85rem;
    font-weight: 600;
}
.admin-request-detail {
    font-size: 0.9rem;
    margin: 0.25rem 0;
    color: var(--text);
}
.admin-request-message {
    font-size: 0.85rem;
    color: var(--text-light);
    font-style: italic;
    margin: 0.5rem 0;
}
.admin-request-date {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0.25rem 0 0.5rem;
}
.admin-request-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

/* Success / Danger button variants */
.btn-success {
    background: var(--palm);
    color: var(--white);
    border: none;
}
.btn-success:hover {
    background: #4a8e4a;
}
.btn-danger {
    background: var(--danger);
    color: var(--white);
    border: none;
}
.btn-danger:hover {
    background: #c04040;
}
