/* Admin Panel Styles */
:root {
    --primary: #2E8B8B;
    --primary-dark: #1a5555;
    --secondary: #6C757D;
    --success: #28A745;
    --warning: #FFC107;
    --danger: #DC3545;
    --light: #F8F9FA;
    --dark: #212529;
    --white: #FFFFFF;
    --sidebar-width: 260px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.5;
}

.hidden {
    display: none !important;
}

/* Login Screen */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-header h1 {
    font-size: 1.5rem;
    color: var(--primary);
}

.login-header p {
    color: var(--secondary);
}

/* Form Elements */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 0.875rem;
}

.input {
    width: 100%;
    padding: 12px;
    border: 1px solid #DEE2E6;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 139, 139, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: #E9ECEF;
    color: var(--dark);
}

.btn-secondary:hover {
    background: #DEE2E6;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-block {
    width: 100%;
}

.error-text {
    color: var(--danger);
    font-size: 0.875rem;
    margin-top: 12px;
    text-align: center;
}

/* Admin Panel Layout */
.admin-panel {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 1.125rem;
}

.badge {
    display: inline-block;
    padding: 4px 8px;
    background: var(--primary);
    border-radius: 4px;
    font-size: 0.75rem;
    margin-top: 8px;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s;
}

.nav-item:hover,
.nav-item.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    border-left: 3px solid var(--primary);
}

.nav-item .icon {
    font-size: 1.25rem;
}

.sidebar-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 32px;
}

.section {
    max-width: 1200px;
}

.section h1 {
    margin-bottom: 24px;
    font-size: 1.75rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-header h1 {
    margin-bottom: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-icon {
    font-size: 2.5rem;
}

.stat-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    color: var(--secondary);
    font-size: 0.875rem;
}

/* Cards */
.card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card h3 {
    margin-bottom: 16px;
}

.text-muted {
    color: var(--secondary);
}

/* Spaces List */
.spaces-list {
    display: grid;
    gap: 16px;
}

.space-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 16px;
}

.space-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 8px;
}

.space-info {
    flex: 1;
}

.space-info h4 {
    margin-bottom: 4px;
}

.space-info p {
    color: var(--secondary);
    font-size: 0.875rem;
}

.space-actions {
    display: flex;
    gap: 8px;
}

/* Filters */
.filters {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.filters .input {
    max-width: 200px;
}

/* Reservations List */
.reservations-list {
    display: grid;
    gap: 12px;
}

.reservation-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 16px;
    align-items: center;
}

.reservation-item .guest {
    font-weight: 600;
}

.reservation-item .dates {
    color: var(--secondary);
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-pending {
    background: #FFF3CD;
    color: #856404;
}

.status-confirmed {
    background: #D4EDDA;
    color: #155724;
}

.status-completed {
    background: #D1ECF1;
    color: #0C5460;
}

.status-cancelled {
    background: #F8D7DA;
    color: #721C24;
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 700px;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #E9ECEF;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--secondary);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #E9ECEF;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Tabs */
.form-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 1px solid #E9ECEF;
    padding-bottom: 8px;
}

.tab-btn {
    background: none;
    border: none;
    padding: 8px 16px;
    font-size: 0.875rem;
    color: var(--secondary);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s;
}

.tab-btn:hover {
    background: #F8F9FA;
}

.tab-btn.active {
    background: var(--primary);
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Upcoming checkins */
.checkin-item {
    padding: 12px 0;
    border-bottom: 1px solid #E9ECEF;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkin-item:last-child {
    border-bottom: none;
}

.checkin-info strong {
    display: block;
}

.checkin-info span {
    color: var(--secondary);
    font-size: 0.875rem;
}

.checkin-date {
    text-align: right;
}

.checkin-date strong {
    color: var(--primary);
}