/* ========== HOST PORTAL - Clean Dark Theme ========== */
:root {
    --bg-dark: #0f1117;
    --bg-card: #1a1d24;
    --bg-hover: #22262e;
    --accent: #6366f1;
    --accent-glow: rgba(99, 102, 241, 0.25);
    --text: #f0f0f5;
    --text-soft: #a0a3b0;
    --text-muted: #6b6e7a;
    --border: rgba(255, 255, 255, 0.08);
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
}

/* ========== AUTH PAGES ========== */
.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

@media (max-width: 900px) {
    .auth-container {
        grid-template-columns: 1fr;
    }

    .auth-side {
        display: none;
    }
}

.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px;
    max-width: 480px;
    margin: 0 auto;
}

.auth-header {
    margin-bottom: 32px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.logo-icon {
    font-size: 32px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
}

.auth-header p {
    color: var(--text-soft);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-soft);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 14px 16px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 15px;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.error-message {
    color: var(--error);
    font-size: 14px;
    min-height: 20px;
}

.success-message {
    color: var(--success);
    font-size: 14px;
}

.btn-primary {
    padding: 14px 24px;
    border-radius: 10px;
    background: var(--accent);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #5558e3;
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 10px 16px;
    border-radius: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--accent);
}

.btn-danger {
    padding: 10px 16px;
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: var(--error);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
}

.hidden {
    display: none !important;
}

.auth-footer {
    margin-top: 24px;
    text-align: center;
    color: var(--text-soft);
}

.auth-footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-side {
    background: linear-gradient(135deg, #1a1d24 0%, #0f1117 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
    position: relative;
}

.auth-side::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.12), transparent 70%);
}

.auth-side-content {
    position: relative;
    z-index: 1;
}

.auth-side-content h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
}

.features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.features-list li {
    font-size: 16px;
    color: var(--text-soft);
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ========== DASHBOARD ========== */
.dashboard {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

@media (max-width: 900px) {
    .dashboard {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }
}

.sidebar {
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-soft);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.15s;
}

.nav-item:hover {
    background: var(--bg-hover);
    color: var(--text);
}

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
}

.nav-item .icon {
    font-size: 18px;
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
}

.user-name {
    font-weight: 500;
    font-size: 14px;
}

.user-plan {
    font-size: 12px;
    color: var(--text-muted);
}

.main-content {
    padding: 28px;
    overflow-y: auto;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
}

.page-subtitle {
    color: var(--text-soft);
    margin-top: 4px;
    font-size: 14px;
}

/* ========== STATS GRID ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
}

.stat-card .stat-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    color: var(--text-soft);
    font-size: 13px;
}

/* ========== PROPERTY CARDS ========== */
.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.property-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    overflow: hidden;
    transition: all 0.2s;
}

.property-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.property-image {
    height: 120px;
    background: linear-gradient(135deg, #1a1d24, #0f1117);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
}

.property-content {
    padding: 16px;
}

.property-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
}

.property-location {
    color: var(--text-soft);
    font-size: 13px;
    margin-bottom: 12px;
}

.property-stats {
    display: flex;
    gap: 14px;
    margin-bottom: 14px;
}

.property-stat {
    font-size: 12px;
    color: var(--text-soft);
}

.property-stat strong {
    color: var(--text);
}

.property-actions {
    display: flex;
    gap: 8px;
}

.property-actions button {
    flex: 1;
}

/* ========== ADD PROPERTY CARD ========== */
.add-property-card {
    background: var(--bg-card);
    border-radius: 12px;
    border: 2px dashed var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 260px;
}

.add-property-card:hover {
    border-color: var(--accent);
    background: var(--bg-hover);
}

.add-property-card .icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.add-property-card span {
    color: var(--text-soft);
    font-size: 14px;
}

/* ========== MODAL ========== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: var(--bg-card);
    border-radius: 16px;
    border: 1px solid var(--border);
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-soft);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
}

.modal-close:hover {
    color: var(--text);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ========== QR CODE ========== */
.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    background: white;
    border-radius: 12px;
    margin: 16px 0;
}

.qr-code {
    padding: 12px;
    background: white;
}

.qr-code img {
    display: block;
}

.qr-info {
    text-align: center;
    margin-top: 12px;
    color: #333;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--text-soft);
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 6px;
    color: var(--text);
}

/* ========== LOADING ========== */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px;
}

.spinner {
    width: 36px;
    height: 36px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== SETTINGS PAGE ========== */
.settings-section {
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 24px;
    margin-bottom: 20px;
}

.settings-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.settings-row:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.settings-label {
    font-size: 14px;
}

.settings-value {
    color: var(--text-soft);
    font-size: 14px;
}

/* ========== BADGES ========== */
.badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
}

.badge-error {
    background: rgba(239, 68, 68, 0.15);
    color: var(--error);
}

/* Form Inputs */
input.form-input {
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

input.form-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

.text-ocean {
    background: -webkit-linear-gradient(45deg, #00C9FF, #92FE9D);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}