:root {
    --bg-color: #0d0d0d;
    --card-bg: #161616;
    --sidebar-bg: #1c1c1c;
    --border-color: #2a2a2a;
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --primary-color: #c9ff4d; /* Lime green from screenshot */
    --primary-hover: #b5e645;
    --danger-color: #ff4d4d;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Auth View */
.view-container {
    display: none;
    width: 100vw;
    height: 100vh;
}
.view-container.active {
    display: flex;
}
#auth-view {
    align-items: center;
    justify-content: center;
}
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
}

/* Dashboard Layout */
#dashboard-view, #tenant-detail-view {
    padding: 1.5rem;
    gap: 1.5rem;
}

/* Sidebar */
.sidebar {
    width: 80px;
    background-color: var(--sidebar-bg);
    border-radius: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 0;
    gap: 1rem;
}

.sidebar .top-action {
    background: var(--primary-color);
    color: #000;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    cursor: pointer;
    margin-bottom: 2rem;
    border: none;
}

.sidebar-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    background: transparent;
    border: none;
}

.sidebar-icon:hover {
    color: var(--text-primary);
}

.sidebar-icon.active {
    background: #e0e0e0;
    color: #000;
}

.sidebar-spacer {
    flex: 1;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    padding-right: 1rem;
}

/* Top Nav */
.top-nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.top-nav .nav-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--sidebar-bg);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Header Section */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 600px;
    line-height: 1.5;
}

.header-btn {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
}

.kpi-title {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.kpi-subtitle {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-top: auto;
}

.kpi-icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    color: var(--primary-color);
    background: rgba(201, 255, 77, 0.1);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Main Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
}

/* Panels */
.panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1.5rem;
}

.panel-title {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

.panel-subtitle {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.action-card {
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.action-card:hover {
    border-color: var(--primary-color);
}

.action-icon {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
}

.action-title {
    font-size: 0.85rem;
    color: var(--text-primary);
}

/* Modern Table */
.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    text-align: left;
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.8rem;
    text-transform: uppercase;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.modern-table td {
    padding: 1rem 0;
    border-bottom: 1px solid #1f1f1f;
    font-size: 0.9rem;
}

.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.status-badge.active {
    background: rgba(201, 255, 77, 0.1);
    color: var(--primary-color);
}
.status-badge.pending {
    background: rgba(255, 165, 0, 0.1);
    color: orange;
}

/* Modals & Forms */
.input-group {
    margin-bottom: 1.5rem;
}
.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.input-group input, .input-group select {
    width: 100%;
    background: #1a1a1a;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
}
.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: var(--primary-color);
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}
.panel-header h4 {
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.8rem;
    margin: 0;
}

.btn-primary {
    background: var(--primary-color);
    color: #000;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.btn-primary:hover {
    background: var(--primary-hover);
}
.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    z-index: 100;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 16px;
    width: 100%; max-width: 450px;
}
.modal h3 { margin-bottom: 1.5rem; }
.modal-actions { display: flex; justify-content: flex-end; gap: 1rem; margin-top: 2rem; }

/* Detail View Layout */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.detail-grid p {
    margin-bottom: 0.8rem;
    color: var(--text-secondary);
}
.detail-grid strong {
    color: var(--text-primary);
}
