/* GridIron CRM — Minimalist Blue Theme */

:root {
    --primary: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary: #64748b;
    --success: #22c55e;
    --success-dark: #16a34a;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;

    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #94a3b8;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.1);

    --radius-sm: 4px;
    --radius: 6px;
    --radius-md: 8px;
    --radius-lg: 10px;
    --radius-full: 9999px;

    --transition: all 0.15s ease;
    --transition-fast: all 0.1s ease;

    --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font);
    line-height: 1.6;
    color: var(--text-primary);
    background: #f1f5f9;
    min-height: 100vh;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
}

/* ================================================================
   LOGIN
   ================================================================ */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background: #f1f5f9;
}

.login-wrapper {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    padding: 2.5rem;
}

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

.login-header h1 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.25rem;
}

.login-subtitle {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    font-weight: 400;
}

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

.login-form .form-actions {
    margin-top: 1.5rem;
    margin-bottom: 0;
    border-top: none;
    padding-top: 0;
}

.login-forgot {
    margin-top: 1rem;
    margin-bottom: 0;
    text-align: center;
}

.login-forgot a {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    text-decoration: none;
}

.login-forgot a:hover {
    color: var(--primary);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.login-error {
    background: #fef2f2;
    color: var(--danger);
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius);
    font-size: 0.8125rem;
    margin-bottom: 1.25rem;
    border: 1px solid #fecaca;
}

/* ================================================================
   HEADER
   ================================================================ */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    margin-bottom: 0;
}

h1 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h2 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

h3 {
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.back-link {
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: var(--transition);
    padding: 0.25rem 0;
}

.back-link:hover {
    color: var(--primary-dark);
    transform: none;
}

.page-title {
    margin-top: 0.5rem;
}

.page-subtitle {
    color: var(--text-tertiary);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ================================================================
   SETTINGS DROPDOWN
   ================================================================ */
.settings-dropdown {
    position: relative;
}

.settings-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--bg-primary);
    color: var(--text-tertiary);
    cursor: pointer;
    transition: var(--transition);
}

.settings-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-color: var(--gray-300);
}

.settings-btn[aria-expanded="true"] {
    background: var(--bg-secondary);
    color: var(--primary);
    border-color: var(--primary);
}

.settings-icon {
    width: 1.125rem;
    height: 1.125rem;
}

.settings-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 10rem;
    padding: 4px;
    background: var(--bg-primary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.settings-menu[hidden] {
    display: none;
}

.settings-menu:not([hidden]) {
    display: block;
}

.settings-menu-item {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: none;
    border-radius: var(--radius);
    background: none;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
}

.settings-menu-item:hover {
    background: var(--bg-tertiary);
    color: var(--primary);
}

.settings-menu-item[data-logout]:hover {
    color: var(--danger);
}

.settings-menu-item[href] {
    text-decoration: none;
    color: inherit;
}

/* ================================================================
   BUTTONS
   ================================================================ */
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-family: var(--font);
    letter-spacing: 0;
    box-shadow: none;
    min-height: 36px;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--gray-200);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--text-primary);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: var(--success-dark);
}

.btn-danger {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

.btn-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.btn-warning:hover {
    background: #fef3c7;
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.btn-small, .btn-sm {
    padding: 0.3125rem 0.625rem;
    font-size: 0.75rem;
}

.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-success:hover {
    background: var(--success-dark);
}

/* ================================================================
   MODALS
   ================================================================ */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: modalFadeIn 0.15s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 1px solid var(--gray-200);
    animation: modalSlideUp 0.2s ease;
}

.modal-content--sm {
    max-width: 400px;
}

.confirm-modal-message {
    margin: 0 0 1.5rem;
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.875rem;
}

@keyframes modalSlideUp {
    from {
        transform: translateY(12px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    padding-bottom: 0.875rem;
    border-bottom: 1px solid var(--gray-100);
}

.modal-header h2 {
    margin: 0;
}

.close-btn {
    background: transparent;
    border: 1px solid var(--gray-200);
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-tertiary);
    width: 1.75rem;
    height: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: var(--transition);
    line-height: 1;
    padding: 0;
}

.close-btn:hover {
    background: var(--gray-50);
    color: var(--text-primary);
    border-color: var(--gray-300);
    transform: none;
}

/* ================================================================
   FORMS
   ================================================================ */
.form-group {
    margin-bottom: 1.25rem;
}

.form-section-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 1.25rem 0 0.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.375rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.8125rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: var(--font);
    background: #fff;
    color: var(--text-primary);
    transition: var(--transition);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.25rem;
    padding-right: 2rem;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--gray-100);
}

.form-error {
    color: var(--danger);
    font-size: 0.8125rem;
    margin-top: 0.5rem;
}

/* Custom Select Dropdown */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-wrapper select {
    display: none;
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-family: var(--font);
    background: #fff;
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.custom-select-trigger:hover {
    border-color: var(--gray-300);
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.custom-select-trigger .custom-select-arrow {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
    margin-left: 0.5rem;
    transition: transform 0.15s ease;
}

.custom-select-wrapper.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-trigger .custom-select-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.custom-select-trigger .custom-select-placeholder {
    color: var(--text-tertiary);
}

.custom-select-options {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
}

.custom-select-wrapper.open .custom-select-options {
    display: block;
}

.custom-select-option {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: var(--radius);
    transition: background 0.1s ease;
}

.custom-select-option:hover {
    background: var(--gray-50);
}

.custom-select-option.selected {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary);
    font-weight: 500;
}

.custom-select-option.selected:hover {
    background: rgba(59, 130, 246, 0.12);
}

.custom-select-options::-webkit-scrollbar {
    width: 5px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: transparent;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 3px;
}

/* ================================================================
   DASHBOARD — KANBAN
   ================================================================ */
.kanban {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
}

.status-section-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    padding: 0;
    border-bottom: none;
    margin-bottom: 0.75rem;
}

.status-section-header h2 {
    margin: 0;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-tertiary);
}

.status-count {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--gray-300);
    border: none;
}

.property-card {
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 0.375rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.property-card::before {
    display: none;
}

.property-card:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-sm);
}

.property-card-address {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9375rem;
    letter-spacing: -0.01em;
    margin: 0;
}

.property-card-parcel {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin: 0;
}

.property-card-date,
.property-card-created-by {
    font-size: 0.6875rem;
    color: var(--gray-300);
    margin: 0;
}

.property-card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--gray-100);
}

.property-card-created-by::before {
    content: '\00b7';
    margin-right: 0.75rem;
    color: var(--gray-200);
}

.property-card-empty {
    padding: 1.25rem;
    background: transparent;
    border: 1px dashed var(--gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: 0.375rem;
    text-align: center;
}

.property-card-empty p {
    color: var(--text-tertiary);
    margin: 0;
    font-size: 0.8125rem;
}

/* ================================================================
   STATUS BADGE
   ================================================================ */
.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-full);
    font-size: 0.6875rem;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ================================================================
   PROPERTY DETAIL
   ================================================================ */
.property-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0;
    padding: 1.5rem 2rem;
    background: #fff;
    border-bottom: 1px solid var(--gray-200);
    border-radius: 0;
}

.property-info {
    display: grid;
    gap: 0;
}

.info-section {
    background: #fff;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-100);
    border-radius: 0;
    box-shadow: none;
    transition: none;
    margin-bottom: 0;
}

.info-section:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.info-section:hover {
    box-shadow: none;
}

.info-table {
    width: 100%;
    border-collapse: collapse;
}

.info-table td {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-50);
    font-size: 0.875rem;
}

.info-table td:first-child {
    width: 160px;
    color: var(--text-tertiary);
    font-weight: 500;
    font-size: 0.8125rem;
}

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

.text-muted {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

.text-danger {
    color: var(--danger);
}

/* ================================================================
   TABS
   ================================================================ */
.tabs-nav {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    background: #fff;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 10;
}

.tab-btn {
    padding: 0.75rem 1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-tertiary);
    font-weight: 500;
    font-size: 0.8125rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-family: var(--font);
    margin-bottom: -1px;
    min-height: 40px;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: transparent;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.tab-content .info-section {
    border-bottom: 1px solid var(--gray-100);
}

.tab-content .info-section:last-child {
    border-bottom: none;
}

/* ================================================================
   CHECKLIST
   ================================================================ */
.checklist-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 1rem;
    margin-bottom: 0;
    background: #fff;
    border-radius: 0;
    border-left: 3px solid var(--gray-200);
    transition: var(--transition);
    position: relative;
}

.checklist-item:hover {
    background: var(--gray-50);
    transform: none;
}

.checklist-item.completed {
    border-left-color: var(--success);
    background: rgba(34, 197, 94, 0.02);
}

.checklist-item input[type="checkbox"] {
    margin-right: 0.75rem;
    margin-top: 0.2rem;
    cursor: pointer;
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
}

.checklist-item-label {
    flex: 1;
}

.checklist-item-name {
    font-weight: 500;
    margin-bottom: 0.125rem;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.checklist-item-description {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    line-height: 1.5;
}

.checklist-items-container {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--gray-100);
    border-radius: var(--radius);
    overflow: hidden;
}

.checklist-items-container.long-checklist {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.checklist-items-container.long-checklist .checklist-item {
    transition: var(--transition);
}

.checklist-items-container.long-checklist .checklist-item:hover {
    z-index: 1;
}

.checklist-item.phase-item {
    position: relative;
}

.checklist-item.phase-item::before,
.checklist-item.phase-item::after {
    display: none;
}

.phase-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--gray-100);
    color: var(--text-secondary);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.6875rem;
    margin-right: 0.5rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.checklist-item.completed .phase-number {
    background: var(--success);
    color: #fff;
}

.checklist-item-required {
    font-size: 0.625rem;
    color: var(--danger);
    margin-left: 0.375rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.checklist-summary {
    margin-bottom: 0;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.checklist-summary.checklist-ready {
    border-color: var(--success);
    background: rgba(34, 197, 94, 0.03);
}

.checklist-summary.checklist-not-ready {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.03);
}

.checklist-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.checklist-summary-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8125rem;
}

.checklist-summary-status {
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.1875rem 0.5rem;
    border-radius: var(--radius);
}

.checklist-summary-status.status-ready {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-dark);
}

.checklist-summary-status.status-not-ready {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

.checklist-progress-bar {
    width: 100%;
    height: 4px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.checklist-progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-full);
    transition: width 0.3s ease;
}

.checklist-summary-text {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 400;
}

.checklist-item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.btn-notes {
    padding: 0.1875rem 0.5rem;
    background: transparent;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.6875rem;
    cursor: pointer;
    transition: var(--transition);
    font-family: var(--font);
    color: var(--text-tertiary);
}

.btn-notes:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
}

.btn-notes.has-notes {
    background: rgba(59, 130, 246, 0.06);
    border-color: rgba(59, 130, 246, 0.2);
    color: var(--primary);
    font-weight: 500;
}

/* Phase timeline (hidden in minimal design) */
.checklist-phase-timeline {
    display: none;
}

/* ================================================================
   PROPERTY STATUS INFO
   ================================================================ */
.property-status-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.status-badge-container {
    display: flex;
    align-items: center;
}

.status-timer {
    text-align: right;
    padding: 0.5rem 0.75rem;
    background: rgba(59, 130, 246, 0.06);
    border: 1px solid rgba(59, 130, 246, 0.15);
    border-radius: var(--radius-md);
    color: var(--primary);
    min-width: 120px;
}

.timer-label {
    font-size: 0.625rem;
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.125rem;
}

.timer-value {
    font-size: 1.0625rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--primary);
}

/* ================================================================
   STATUS ACTIONS
   ================================================================ */
.status-info-card {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.status-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.375rem 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.8125rem;
}

.status-info-row:last-child {
    border-bottom: none;
}

.status-info-label {
    font-weight: 500;
    color: var(--text-tertiary);
    font-size: 0.8125rem;
}

.status-info-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8125rem;
}

.status-info-value.status-ready {
    color: var(--success);
}

.status-info-value.status-not-ready {
    color: var(--danger);
}

.status-warning {
    margin-top: 0.25rem;
    padding: 0.625rem 0.75rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    color: #991b1b;
    font-size: 0.8125rem;
    font-weight: 400;
}

.advance-button-container {
    margin-top: 0.5rem;
}

.advance-button {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    border-radius: var(--radius-md);
}

.advance-button:not(.disabled):hover {
    transform: none;
    opacity: 0.9;
}

.advance-button.disabled {
    opacity: 0.35;
    cursor: not-allowed;
    background: var(--gray-200);
    color: var(--text-tertiary);
}

.advance-button.disabled:hover {
    transform: none;
}

.button-icon {
    font-size: 1rem;
    font-weight: 700;
}

.status-action-item.final-status {
    padding: 1.5rem;
    background: rgba(34, 197, 94, 0.06);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.final-status-icon {
    font-size: 2rem;
    font-weight: 700;
    color: var(--success);
}

.final-status strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.final-status p {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin: 0;
}

/* ================================================================
   STATUS TIMELINE
   ================================================================ */
.status-timeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: 1.5rem;
}

.status-timeline::before {
    content: '';
    position: absolute;
    left: 0.4375rem;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding: 0.75rem 0 0.75rem 1.5rem;
}

.timeline-marker {
    position: absolute;
    left: -1.030rem;
    top: 50%;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: var(--radius-full);
    background: var(--gray-300);
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px var(--gray-200);
    z-index: 2;
    transform: translate(-50%, -50%);
}

.timeline-item.completed .timeline-marker {
    background: var(--success);
    box-shadow: 0 0 0 1px var(--success);
}

.timeline-item.current .timeline-marker {
    background: var(--primary);
    box-shadow: 0 0 0 1px var(--primary);
    animation: timelinePulse 2s infinite;
}

@keyframes timelinePulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

.timeline-content {
    background: var(--gray-50);
    border: 1px solid var(--gray-100);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.timeline-item:hover .timeline-content {
    border-color: var(--gray-200);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.375rem;
}

.timeline-status {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.8125rem;
}

.timeline-duration {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.75rem;
    padding: 0.125rem 0.5rem;
    background: rgba(59, 130, 246, 0.06);
    border-radius: var(--radius);
}

.timeline-dates {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.timeline-date {
    display: block;
}

.current-badge {
    color: var(--success);
    font-weight: 600;
}

/* ================================================================
   DOCUMENTS
   ================================================================ */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--gray-100);
}

.document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #fff;
    transition: var(--transition);
}

.document-item:hover {
    background: var(--gray-50);
}

.document-info {
    flex: 1;
}

.document-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
    font-size: 0.875rem;
}

.document-meta {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.document-description {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.document-actions {
    display: flex;
    gap: 0.375rem;
}

/* ================================================================
   INVESTORS
   ================================================================ */
.investors-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--gray-100);
}

.investor-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
}

.investor-info {
    min-width: 0;
    flex: 1;
}

.investor-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.375rem;
    font-size: 0.875rem;
}

.investor-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.125rem 1.5rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.investor-field {
    min-width: 0;
}

.investor-field strong {
    color: var(--text-primary);
    font-weight: 500;
}

/* ================================================================
   BUDGET
   ================================================================ */
.budget-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
    font-size: 0.8125rem;
}

.budget-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.budget-table th:last-child,
.budget-table td:last-child {
    text-align: center;
}

.budget-table th:last-child {
    width: 1%;
    white-space: nowrap;
}

.budget-table td:last-child {
    white-space: nowrap;
}

.budget-table td:last-child .btn + .btn {
    margin-left: 0.375rem;
}

.budget-table td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--gray-50);
    vertical-align: middle;
}

.budget-table tr:hover {
    background: var(--gray-50);
}

.budget-table tr.budget-over {
    background: rgba(239, 68, 68, 0.03);
}

.budget-table tr.budget-warning {
    background: rgba(245, 158, 11, 0.03);
}

.budget-progress {
    position: relative;
    width: 80px;
    height: 4px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.budget-progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.budget-summary {
    padding: 0.75rem 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-100);
}

.budget-summary-row {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    font-size: 0.8125rem;
}

/* ================================================================
   PERMITS
   ================================================================ */
.permits-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--gray-100);
}

.permit-item {
    padding: 1rem;
    background: #fff;
}

.permit-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.permit-type {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
}

.permit-number {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.permit-status {
    padding: 0.1875rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.permit-status.status-approved {
    background: rgba(34, 197, 94, 0.1);
    color: var(--success-dark);
}

.permit-status.status-rejected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.permit-status.status-pending {
    background: rgba(245, 158, 11, 0.08);
    color: #b45309;
}

.permit-status.status-default {
    background: var(--gray-50);
    color: var(--text-secondary);
}

.permit-dates {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-bottom: 0.375rem;
}

.permit-notes {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    padding: 0.375rem 0.625rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.permit-actions {
    display: flex;
    gap: 0.375rem;
}

/* ================================================================
   ALERTS
   ================================================================ */
.alerts-section {
    margin-bottom: 1.5rem;
}

.alerts-section h4 {
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.alert-item {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    border-left: 3px solid;
    transition: var(--transition);
    background: #fff;
}

.alert-item.alert-critical {
    border-left-color: var(--danger);
}

.alert-item.alert-high {
    border-left-color: var(--warning);
}

.alert-item.alert-medium {
    border-left-color: var(--primary);
}

.alert-item.alert-low {
    border-left-color: var(--gray-300);
}

.alert-item.resolved {
    opacity: 0.5;
}

.alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.alert-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.alert-severity-badge {
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.alert-severity-badge.critical {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.alert-severity-badge.high {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

.alert-severity-badge.medium {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary);
}

.alert-severity-badge.low {
    background: var(--gray-50);
    color: var(--text-tertiary);
}

.alert-message {
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
}

.alert-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

/* ================================================================
   ALERTS BANNER
   ================================================================ */
.alerts-banner {
    background: #fffbeb;
    color: var(--text-secondary);
    padding: 0.5rem 2rem;
    margin-bottom: 0;
    border-radius: 0;
    border-bottom: 1px solid #f0e5c9;
    box-shadow: none;
}

.alerts-banner-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
    font-size: 0.8125rem;
}

.alerts-banner-content strong {
    color: #b45309;
    font-weight: 600;
}

.alerts-icon {
    display: flex;
    align-items: center;
    color: #d97706;
}

.alerts-banner-content a {
    color: #92400e;
    text-decoration: none;
    font-weight: 500;
    margin-left: auto;
    font-size: 0.8125rem;
}

.alerts-banner-content a:hover {
    text-decoration: underline;
}

/* ================================================================
   ADVANCE STATUS MODAL
   ================================================================ */
.advance-status-info {
    padding: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-transition-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-100);
}

.status-from,
.status-to {
    flex: 1;
    text-align: center;
}

.status-label {
    font-size: 0.6875rem;
    color: var(--text-tertiary);
    margin-bottom: 0.375rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-value {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-arrow {
    font-size: 1.25rem;
    color: var(--primary);
    font-weight: bold;
}

.status-warning-box {
    padding: 0.75rem;
    background: rgba(245, 158, 11, 0.05);
    border: 1px solid rgba(245, 158, 11, 0.2);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.status-warning-box strong {
    color: #b45309;
    display: block;
    margin-bottom: 0.125rem;
    font-size: 0.8125rem;
}

/* ================================================================
   ANALYTICS
   ================================================================ */
.analytics-content {
    display: flex;
    flex-direction: column;
}

.analytics-content .info-section {
    margin-bottom: 0 !important;
}

.section-description {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
}

.analytics-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
}

.analytics-table th {
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
    font-weight: 600;
    color: var(--text-tertiary);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.analytics-table td {
    padding: 0.625rem 0.75rem;
    border-bottom: 1px solid var(--gray-50);
    color: var(--text-primary);
}

.analytics-table tr:hover {
    background: var(--gray-50);
}

.duration-cell {
    font-family: 'DM Sans', monospace;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.8125rem;
}

/* Bottlenecks */
.bottlenecks-list {
    display: grid;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.bottleneck-card {
    background: #fff;
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: var(--radius-md);
    padding: 1rem;
    transition: var(--transition);
}

.bottleneck-card:hover {
    border-color: rgba(245, 158, 11, 0.4);
}

.bottleneck-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.bottleneck-status {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.bottleneck-badge {
    padding: 0.1875rem 0.5rem;
    border-radius: var(--radius);
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bottleneck-badge.moderate {
    background: rgba(245, 158, 11, 0.1);
    color: #b45309;
}

.bottleneck-badge.severe {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.bottleneck-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.75rem;
}

.bottleneck-stat {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.stat-label {
    font-size: 0.625rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 500;
}

.stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.bottleneck-none {
    text-align: center;
    padding: 2rem;
    background: rgba(34, 197, 94, 0.03);
    border: 1px solid rgba(34, 197, 94, 0.15);
    border-radius: var(--radius-md);
}

.bottleneck-icon {
    font-size: 2rem;
    color: var(--success);
    margin-bottom: 0.5rem;
}

.bottleneck-none p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin: 0;
}

/* ================================================================
   MANAGE USERS / PROPERTIES
   ================================================================ */
.users-management .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: flex-end;
}

.users-management .form-group-action {
    flex-shrink: 0;
}

.users-management .form-error {
    margin-top: 0.5rem;
    padding: 0.5rem 0;
    color: var(--danger);
    font-size: 0.8125rem;
}

.users-table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

.users-table th,
.users-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.users-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--text-tertiary);
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom-color: var(--gray-200);
}

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

.users-table tbody tr:hover {
    background: var(--gray-50);
}

.role-badge {
    display: inline-block;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius);
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: capitalize;
}

.role-badge.role-admin {
    background: rgba(59, 130, 246, 0.08);
    color: var(--primary);
}

.role-badge.role-user {
    background: var(--gray-50);
    color: var(--text-tertiary);
}

.users-actions {
    white-space: nowrap;
}

.users-actions .btn {
    margin-right: 0.375rem;
}

.users-actions .btn:last-child {
    margin-right: 0;
}

.dead-badge {
    display: inline-block;
    margin-left: 0.375rem;
    padding: 0.0625rem 0.375rem;
    font-size: 0.625rem;
    font-weight: 600;
    text-transform: uppercase;
    background: var(--gray-100);
    color: var(--text-tertiary);
    border-radius: var(--radius);
    letter-spacing: 0.03em;
}

.property-row-dead td {
    opacity: 0.6;
}

/* ================================================================
   LOADING & ERROR
   ================================================================ */
.loading {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-tertiary);
    font-weight: 400;
    font-size: 0.875rem;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    margin: 1rem 2rem;
    font-weight: 400;
    font-size: 0.875rem;
}

/* ================================================================
   NOTIFICATIONS
   ================================================================ */
.notification {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 10000;
    min-width: 280px;
    max-width: 420px;
    animation: notifSlideIn 0.25s ease;
}

@keyframes notifSlideIn {
    from {
        transform: translateY(-8px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.8125rem;
    border: 1px solid;
}

.notification-success {
    background: #f0fdf4;
    color: var(--success-dark);
}

.notification-success .notification-content {
    border-color: rgba(34, 197, 94, 0.25);
}

.notification-error {
    background: #fef2f2;
    color: #dc2626;
}

.notification-error .notification-content {
    border-color: #fecaca;
}

.notification-icon {
    font-size: 1rem;
    font-weight: bold;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    line-height: 1.4;
}

.notification-close {
    background: transparent;
    border: none;
    color: inherit;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0;
    width: 1.25rem;
    height: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    transition: var(--transition);
    flex-shrink: 0;
    opacity: 0.5;
}

.notification-close:hover {
    opacity: 1;
}

/* ================================================================
   UTILITIES
   ================================================================ */
html {
    scroll-behavior: smooth;
}

::selection {
    background: rgba(59, 130, 246, 0.15);
    color: var(--text-primary);
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 768px) {
    .container {
        padding: 0;
    }

    header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        padding: 0.875rem 1.25rem;
    }

    .kanban {
        padding: 1.25rem;
    }

    .property-header {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1.25rem;
    }

    .property-status-info {
        align-items: flex-start;
        width: 100%;
    }

    .status-timer {
        width: 100%;
        text-align: left;
    }

    .status-info-card {
        padding: 0.75rem;
    }

    .advance-button {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
    }

    .modal-content {
        padding: 1.25rem;
        margin: 0.75rem;
    }

    .tabs-nav {
        padding: 0 1.25rem;
    }

    .info-section {
        padding: 1.25rem;
    }

    .alerts-banner {
        padding: 0.5rem 1.25rem;
    }

    .property-card-meta {
        flex-wrap: wrap;
        gap: 0;
    }

    .property-card-created-by::before {
        display: none;
    }

    /* Tables: horizontal scroll + smaller font */
    .budget-table,
    .info-table,
    .analytics-table,
    .users-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.8rem;
    }

    /* Info table: remove fixed first-column width */
    .info-table td:first-child {
        width: auto;
    }

    /* Investor fields: single column */
    .investor-fields {
        grid-template-columns: 1fr;
    }

    /* Financial cards: smaller min */
    .financial-summary-cards {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }

    /* Dashboard stats: smaller min */
    .dashboard-stats {
        grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    }

    /* Notifications: full width at top */
    .notification {
        right: 0.75rem;
        left: 0.75rem;
        min-width: 0;
        max-width: none;
    }

    /* Timeline: tighter left padding, align markers with vertical line */
    .status-timeline {
        padding-left: 1rem;
    }

    .status-timeline::before {
        left: 0.4375rem;
    }

    .timeline-item {
        padding: 0.75rem 0 0.75rem 1rem;
    }

    .timeline-marker {
        /* Line is at 0.4375rem from timeline padding; item padding is 1rem.
           Marker center must align: left = 0.4375rem + 1rem - (1rem + 1rem) = -0.5625rem */
        left: -0.5625rem;
    }

    /* Document items: stack vertically */
    .document-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .document-actions {
        width: 100%;
    }

    /* Investor items: stack vertically */
    .investor-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    /* Permit header: stack */
    .permit-header {
        flex-direction: column;
        gap: 0.375rem;
    }

    /* Reminder items: stack vertically */
    .reminder-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .reminder-actions {
        width: 100%;
    }

    /* Budget summary: stack */
    .budget-summary-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Header actions: wrap + smaller */
    body.home .header-actions {
        flex-wrap: wrap;
    }

    body.home .header-actions .btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }

    /* Checklist item actions: shrink */
    .checklist-item-actions {
        flex-shrink: 1;
        flex-wrap: wrap;
    }

    .checklist-item-actions .btn,
    .checklist-item-actions .btn-notes {
        font-size: 0.6875rem;
        padding: 0.1875rem 0.375rem;
    }

    /* Status transition row */
    .status-transition-row {
        flex-direction: column;
        gap: 0.5rem;
    }

    /* Financial section headers: stack title above button */
    #tab-financial .info-section > div[style*="justify-content"] {
        flex-wrap: wrap !important;
        gap: 0.5rem;
    }

    /* Financial tables: ensure scroll wrapper */
    .variance-table,
    #revenueContainer .budget-table,
    #paymentContainer .budget-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.8rem;
    }

    /* Variance table: tighter cells */
    .variance-table td,
    .variance-table th {
        padding: 0.5rem 0.625rem;
        white-space: nowrap;
    }

    /* Financial cards: single column at tablet */
    .financial-summary-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    /* Fin card: reduce value size */
    .fin-card-value {
        font-size: 1.15rem;
    }
}

/* ================================================================
   HOMEPAGE OVERRIDES (body.home)
   Layout-specific tweaks for the homepage kanban view.
   ================================================================ */
body.home .container {
    max-width: 1200px;
}

body.home header {
    padding: 0.875rem 2.5rem;
}

body.home .header-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

body.home .header-divider {
    width: 1px;
    height: 1.125rem;
    background: var(--gray-200);
}

body.home .header-subtitle {
    color: var(--text-tertiary);
    font-size: 0.8125rem;
    font-weight: 400;
    margin: 0;
}

body.home .header-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

body.home .kanban {
    padding: 2rem 2.5rem 3rem;
    gap: 0;
}

body.home .status-section {
    margin-bottom: 2rem;
}

body.home .status-section:last-child {
    margin-bottom: 0;
}

body.home .status-cards {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

body.home .property-card-empty p {
    font-style: normal;
}

@keyframes homeCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body.home .property-card {
    animation: homeCardFadeIn 0.3s ease both;
}

@media (max-width: 768px) {
    body.home header {
        padding: 0.75rem 1.25rem;
    }

    body.home .header-divider,
    body.home .header-subtitle {
        display: none;
    }

    body.home .kanban {
        padding: 1.5rem 1.25rem 2rem;
    }

    body.home .alerts-banner {
        padding: 0.5rem 1.25rem;
    }
}

/* ================================================================
   VIEW TABS
   ================================================================ */
.view-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.view-tab {
    padding: 0.625rem 1.25rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.view-tab:hover {
    color: var(--text-primary);
}

.view-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

/* ================================================================
   DASHBOARD
   ================================================================ */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.pipeline-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    transition: border-color 0.2s ease;
}

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

.pipeline-card-count {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.pipeline-card-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.375rem;
    font-weight: 500;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    padding: 1rem;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.dashboard-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .dashboard-columns {
        grid-template-columns: 1fr;
    }
}

.dashboard-column-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

/* Activity Feed */
.activity-feed {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.activity-item {
    display: flex;
    gap: 0.625rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--border);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    flex-shrink: 0;
    margin-top: 0.125rem;
    font-size: 0.625rem;
}

.activity-body {
    flex: 1;
    min-width: 0;
}

.activity-text {
    font-size: 0.8rem;
    color: var(--text-primary);
}

.activity-property {
    font-size: 0.75rem;
    color: var(--primary);
    margin-top: 0.125rem;
}

.activity-details {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

.activity-time {
    font-size: 0.7rem;
    color: var(--text-tertiary, var(--text-secondary));
    margin-top: 0.25rem;
}

/* Dashboard Reminders */
.dashboard-reminders {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dash-reminder-item {
    padding: 0.625rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.375rem;
}

.dash-reminder-item.reminder-overdue {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.dash-reminder-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.dash-reminder-meta {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    display: flex;
    gap: 0.75rem;
}

/* ================================================================
   FILTER CONTROLS
   ================================================================ */
.filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    align-items: center;
}

.filter-input {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    transition: var(--transition);
}

.filter-input:hover {
    border-color: var(--gray-300);
}

.filter-input:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.625rem center;
    transition: var(--transition);
}

.filter-controls .custom-select-wrapper {
    width: auto;
}

.filter-select:hover {
    border-color: var(--gray-300);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-date {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: inherit;
    appearance: none;
    -webkit-appearance: none;
    transition: var(--transition);
}

.filter-date:hover {
    border-color: var(--gray-300);
}

.filter-date:focus {
    outline: none;
    border-color: var(--primary);
}

.filter-date::-webkit-calendar-picker-indicator {
    filter: opacity(0.5);
    cursor: pointer;
}

@media (max-width: 640px) {
    .filter-controls {
        flex-direction: column;
    }
    .filter-input, .filter-select, .filter-date {
        width: 100%;
    }
}

/* ================================================================
   REMINDERS
   ================================================================ */
.reminders-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.reminder-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    gap: 1rem;
}

.reminder-item.reminder-overdue {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.reminder-item.reminder-completed {
    opacity: 0.6;
}

.reminder-info {
    flex: 1;
    min-width: 0;
}

.reminder-title {
    font-weight: 500;
    color: var(--text-primary);
}

.reminder-due {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

.reminder-actions {
    display: flex;
    gap: 0.375rem;
    flex-shrink: 0;
}

/* ===== Financial Tab ===== */

.financial-summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.fin-card {
    background: var(--bg-secondary);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 1.25rem 1rem;
    text-align: center;
}

.fin-card-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 0.375rem;
}

.fin-card-value {
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text-primary);
}

.fin-positive {
    color: var(--success-dark) !important;
}

.fin-negative {
    color: var(--danger) !important;
}

.variance-table td.fin-positive,
.variance-table td.fin-negative {
    font-weight: 600;
}

/* Wrapper for financial tables to enable horizontal scroll on mobile */
.financial-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ================================================================
   RESPONSIVE — SMALL PHONES (480px)
   ================================================================ */
@media (max-width: 480px) {
    /* Tab buttons: smaller */
    .tab-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.7rem;
    }

    /* Tables: even smaller */
    .budget-table,
    .info-table,
    .analytics-table,
    .users-table {
        font-size: 0.75rem;
    }

    .budget-table td,
    .budget-table th,
    .analytics-table td,
    .analytics-table th,
    .users-table td,
    .users-table th {
        padding: 0.375rem 0.5rem;
    }

    /* Financial cards: 2-col grid */
    .financial-summary-cards {
        grid-template-columns: 1fr 1fr;
    }

    /* Modals: full-width slide-up from bottom */
    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-height: 92vh;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        animation: modalSlideUpMobile 0.25s ease;
    }

    .modal {
        align-items: flex-end;
    }

    @keyframes modalSlideUpMobile {
        from {
            transform: translateY(100%);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }

    /* Property header: tighter padding */
    .property-header {
        padding: 1rem;
    }

    /* Buttons: smaller */
    .btn {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    /* Info table: stack label above value */
    .info-table td {
        display: block;
        padding: 0.25rem 0;
    }

    .info-table td:first-child {
        padding-bottom: 0;
        border-bottom: none;
        font-size: 0.7rem;
    }

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

    /* Form actions: stack buttons vertically */
    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Modal actions: stack vertically */
    .modal-actions {
        flex-direction: column;
    }

    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Status transition row: stack */
    .status-transition-row {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .status-arrow {
        transform: rotate(90deg);
    }

    /* Info sections: tighter padding */
    .info-section {
        padding: 1rem;
    }

    /* Tabs nav: tighter */
    .tabs-nav {
        padding: 0 0.75rem;
    }

    /* Kanban: tighter */
    .kanban {
        padding: 1rem;
    }

    body.home .kanban {
        padding: 1rem;
    }

    body.home header {
        padding: 0.625rem 1rem;
    }

    /* Alerts banner */
    .alerts-banner {
        padding: 0.5rem 1rem;
    }

    /* Fin card values: smaller on tiny screens */
    .fin-card-value {
        font-size: 1rem;
    }

    .fin-card {
        padding: 0.75rem 0.5rem;
    }

    .fin-card-label {
        font-size: 0.625rem;
    }

    /* Financial section headers: full stack on small phones */
    #tab-financial .info-section > div[style*="justify-content"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 0.5rem;
    }

    /* Revenue/Payment tables: tighter on small phones */
    #revenueContainer .budget-table,
    #paymentContainer .budget-table,
    .variance-table {
        font-size: 0.7rem;
    }

    #revenueContainer .budget-table td,
    #revenueContainer .budget-table th,
    #paymentContainer .budget-table td,
    #paymentContainer .budget-table th,
    .variance-table td,
    .variance-table th {
        padding: 0.375rem 0.375rem;
        white-space: nowrap;
    }

    /* Action buttons in financial tables: smaller */
    #revenueContainer .budget-table .btn,
    #paymentContainer .budget-table .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.675rem;
    }

    /* Financial cards: stack to single column on very small */
    .financial-summary-cards {
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
    }
}
