/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f26;
    --bg-tertiary: #242b34;
    --bg-card: #1e252e;
    --bg-hover: #2a333f;
    
    --text-primary: #f0f4f8;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    
    --accent-primary: #22c55e;
    --accent-secondary: #16a34a;
    --accent-glow: rgba(34, 197, 94, 0.3);
    
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    
    --border-color: #2d3748;
    --border-light: #374151;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 30px var(--accent-glow);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;
    
    /* Safe area insets for notched phones */
    --safe-area-top: env(safe-area-inset-top, 0px);
    --safe-area-bottom: env(safe-area-inset-bottom, 0px);
    --safe-area-left: env(safe-area-inset-left, 0px);
    --safe-area-right: env(safe-area-inset-right, 0px);
}

/* ===== Base Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    height: 100%;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Background pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse at 20% 20%, rgba(34, 197, 94, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(59, 130, 246, 0.06) 0%, transparent 50%),
        linear-gradient(180deg, var(--bg-primary) 0%, #0a0f14 100%);
    z-index: -1;
}

/* ===== Auth Screen ===== */
.auth-screen {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.auth-screen.active {
    display: flex;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.auth-logo {
    margin-bottom: 40px;
}

.auth-logo-icon {
    font-size: 64px;
    margin-bottom: 16px;
    filter: drop-shadow(0 0 20px var(--accent-glow));
    animation: float 3s ease-in-out infinite;
}

.auth-logo h1 {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), #4ade80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.auth-logo p {
    color: var(--text-secondary);
    font-size: 16px;
}

.auth-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 14px 24px;
    font-size: 15px;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.auth-btn.google-btn {
    background: white;
    color: #333;
    border: none;
}

.auth-btn.google-btn:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.auth-btn.guest-btn {
    background: transparent;
    color: var(--text-muted);
    border: 1px dashed var(--border-light);
    margin-top: 8px;
}

.auth-btn.guest-btn:hover {
    color: var(--text-secondary);
    border-color: var(--text-muted);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 8px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-divider span {
    color: var(--text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.auth-form-container {
    text-align: left;
}

.auth-form-container h2 {
    font-family: var(--font-display);
    font-size: 24px;
    text-align: center;
    margin-bottom: 24px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
    padding: 0;
}

.auth-error {
    color: var(--danger);
    font-size: 13px;
    text-align: center;
    min-height: 20px;
    margin: 0;
}

.auth-link {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
}

.auth-link a {
    color: var(--accent-primary);
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

.auth-footer {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 32px;
}

.full-width {
    width: 100%;
}

/* ===== User Profile ===== */
.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    position: relative;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
    overflow: hidden;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    min-width: 0;
}

.user-name {
    display: block;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-menu-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.user-menu-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.user-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    min-width: 140px;
    overflow: hidden;
}

.user-dropdown.active {
    display: block;
}

.dropdown-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-hover);
}

/* ===== Layout ===== */
.app-container {
    display: flex;
    height: 100%;
    overflow: hidden;
}

/* ===== Mobile Header ===== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    padding-top: var(--safe-area-top);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    z-index: 200;
    align-items: center;
    justify-content: space-between;
    padding-left: 16px;
    padding-right: 16px;
}

.menu-toggle {
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 10px;
}

.menu-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

.mobile-logo .logo-icon {
    font-size: 24px;
}

.mobile-logo h1 {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), #4ade80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-spacer {
    width: 44px;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 150;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.sidebar-overlay.active {
    opacity: 1;
}

/* ===== Sidebar ===== */
.sidebar {
    width: 280px;
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    z-index: 100;
    transition: transform var(--transition-normal);
}

.logo {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
}

.logo-icon {
    font-size: 32px;
    filter: drop-shadow(0 0 10px var(--accent-glow));
}

.logo h1 {
    font-family: var(--font-display);
    font-size: 22px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), #4ade80);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pro Badge */
.pro-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: 4px;
    margin-left: 8px;
}

/* Upgrade Button */
.upgrade-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: calc(100% - 40px);
    margin: 12px 20px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.upgrade-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.upgrade-btn .upgrade-icon {
    font-size: 16px;
}

/* Upgrade Modal */
.upgrade-modal-content {
    max-width: 420px;
}

.upgrade-content {
    padding: 24px;
    text-align: center;
}

.upgrade-hero {
    margin-bottom: 24px;
}

.upgrade-icon-large {
    font-size: 48px;
    margin-bottom: 12px;
}

.upgrade-hero h2 {
    font-family: var(--font-display);
    font-size: 28px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upgrade-price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.price-amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
}

.price-period {
    font-size: 14px;
    color: var(--text-muted);
}

.upgrade-features {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    text-align: left;
}

.upgrade-features h4 {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.upgrade-features ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.upgrade-features li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
}

.upgrade-features li:last-child {
    border-bottom: none;
}

.upgrade-features li strong {
    color: var(--accent-primary);
}

.upgrade-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.upgrade-checkout-btn {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
    padding: 16px 24px !important;
    font-size: 16px !important;
}

.upgrade-checkout-btn:hover {
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4) !important;
}

.upgrade-note {
    font-size: 12px;
    color: var(--text-muted);
}

/* Cloud Sync Indicator */
.sync-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--text-primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sync-indicator.saved,
.sync-indicator.synced,
.sync-indicator.loaded {
    border-color: var(--accent-primary);
}

.sync-indicator.error {
    border-color: #ef4444;
    color: #ef4444;
}

.sync-indicator.offline {
    border-color: #f59e0b;
    color: #f59e0b;
}

/* Cloud Sync Badge in Sidebar */
.sync-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    font-size: 10px;
    font-weight: 600;
    border-radius: 4px;
    margin-left: 8px;
}

.sync-badge.syncing {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ===== Photo Attachments ===== */

.photo-upload-section label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pro-feature-badge {
    display: inline-flex;
    padding: 2px 6px;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    font-size: 9px;
    font-weight: 700;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.photo-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.photo-thumbnail {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.photo-thumbnail:hover {
    transform: scale(1.05);
}

.photo-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-thumbnail .photo-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.photo-thumbnail:hover .photo-delete {
    opacity: 1;
}

.photo-upload-area {
    display: flex;
    align-items: center;
    gap: 12px;
}

.photo-upload-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px !important;
}

.photo-hint {
    font-size: 12px;
    color: var(--text-muted);
}

.photo-upload-progress {
    margin-top: 12px;
}

.progress-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 6px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-primary), #4ade80);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--text-muted);
}

/* Photo Lightbox */
.photo-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.photo-lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    padding: 8px;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 36px;
    padding: 20px 15px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    opacity: 0.7;
    transition: all var(--transition-fast);
}

.lightbox-nav:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: -80px;
}

.lightbox-next {
    right: -80px;
}

.lightbox-caption {
    position: absolute;
    bottom: -35px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 13px;
    white-space: nowrap;
}

/* Task card photo preview */
.task-photos-preview {
    display: flex;
    gap: 4px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.task-photos-preview .mini-thumb {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.task-photos-preview .mini-thumb:hover {
    transform: scale(1.1);
}

.task-photos-preview .more-photos {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-muted);
    cursor: pointer;
}

/* Photo upload disabled state for non-Pro */
.photo-upload-section.disabled {
    opacity: 0.6;
}

.photo-upload-section.disabled .photo-upload-btn {
    cursor: not-allowed;
}

.photo-upgrade-prompt {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
}

.photo-upgrade-prompt button {
    padding: 4px 12px !important;
    font-size: 12px !important;
}

@media (max-width: 768px) {
    .lightbox-nav {
        display: none;
    }
    
    .photo-thumbnail {
        width: 60px;
        height: 60px;
    }
}

/* ===== Cost Tracking ===== */

.cost-input-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.currency-symbol {
    font-size: 16px;
    color: var(--text-secondary);
    font-weight: 500;
}

.cost-input-group input {
    flex: 1;
    max-width: 150px;
}

.currency-code {
    font-size: 12px;
    color: var(--text-muted);
}

.cost-tracking-section.disabled,
.task-history-section.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ===== Task History in Modal ===== */

.task-history-list {
    max-height: 150px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}

.history-item:last-child {
    border-bottom: none;
}

.history-item-date {
    color: var(--text-secondary);
}

.history-item-cost {
    font-weight: 600;
    color: var(--accent-primary);
}

.history-item-notes {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.no-history {
    padding: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* ===== Completion Modal ===== */

.completion-modal-content {
    max-width: 400px;
}

.completion-content {
    padding: 20px;
}

.completion-task-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    text-align: center;
}

/* ===== History Modal ===== */

.history-modal-content {
    max-width: 600px;
    max-height: 80vh;
}

.history-content {
    padding: 20px;
}

.history-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.history-filters select {
    flex: 1;
}

.history-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.summary-card {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: center;
}

.summary-label {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.summary-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent-primary);
}

.history-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.history-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.history-list-item:last-child {
    border-bottom: none;
}

.history-list-item:hover {
    background: var(--bg-tertiary);
}

.history-icon {
    font-size: 20px;
    margin-top: 2px;
}

.history-details {
    flex: 1;
}

.history-task-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.history-meta {
    font-size: 12px;
    color: var(--text-muted);
}

.history-meta span {
    margin-right: 12px;
}

.history-cost {
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 14px;
}

.history-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.no-history-data {
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
}

.no-history-data .empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

@media (max-width: 768px) {
    .history-filters {
        flex-direction: column;
    }
    
    .history-summary {
        grid-template-columns: 1fr;
    }
    
    .history-actions {
        flex-direction: column;
    }
    
    .history-actions button {
        width: 100%;
    }
}

/* ===== Family Sharing ===== */

.sharing-modal-content {
    max-width: 450px;
}

.sharing-content {
    padding: 20px;
}

.sharing-description {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.5;
}

.invite-input-group {
    display: flex;
    gap: 8px;
}

.invite-input-group input {
    flex: 1;
}

.invite-input-group button {
    white-space: nowrap;
}

.shared-members-section {
    margin-top: 24px;
}

.shared-members-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.shared-members-list {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    min-height: 100px;
    max-height: 200px;
    overflow-y: auto;
}

.no-members {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    color: var(--text-muted);
    font-size: 14px;
}

.member-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px;
    border-bottom: 1px solid var(--border-color);
}

.member-item:last-child {
    border-bottom: none;
}

.member-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.member-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--accent-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.member-details {
    display: flex;
    flex-direction: column;
}

.member-name {
    font-weight: 500;
    color: var(--text-primary);
}

.member-email {
    font-size: 12px;
    color: var(--text-muted);
}

.member-role {
    font-size: 12px;
    padding: 2px 8px;
    background: var(--bg-secondary);
    border-radius: 4px;
    color: var(--text-secondary);
}

.member-role.owner {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
}

.member-role.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.member-remove {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    font-size: 16px;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.member-remove:hover {
    opacity: 1;
    color: #ef4444;
}

.sharing-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 20px;
    padding: 12px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-secondary);
}

.nav-section {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-section h3 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.property-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.property-list li {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all var(--transition-fast);
    position: relative;
    min-height: 56px;
}

.property-list li:hover {
    background: var(--bg-hover);
}

.property-list li:active {
    transform: scale(0.98);
}

.property-list li.active {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(34, 197, 94, 0.05));
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.property-list li .property-icon {
    font-size: 18px;
}

.property-list li .property-info {
    flex: 1;
    min-width: 0;
}

.property-list li .property-info span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
}

.property-list li .property-info small {
    font-size: 11px;
    color: var(--text-muted);
}

.property-list li .task-count {
    background: var(--danger);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    min-width: 22px;
    text-align: center;
}

.property-list li .task-count.none {
    background: var(--accent-primary);
}

.add-property-btn {
    width: 100%;
    padding: 14px 16px;
    margin-top: 12px;
    background: transparent;
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
}

.add-property-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(34, 197, 94, 0.05);
}

.add-property-btn:active {
    transform: scale(0.98);
}

.add-property-btn span {
    font-size: 18px;
    font-weight: 300;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    padding-bottom: calc(20px + var(--safe-area-bottom));
}

/* Notification Section */
.notification-section {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.notification-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.toggle-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toggle-icon {
    font-size: 18px;
}

.toggle-label {
    font-size: 14px;
    font-weight: 500;
}

.notification-status {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 8px;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    transition: all var(--transition-fast);
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: var(--text-muted);
    transition: all var(--transition-fast);
    border-radius: 50%;
}

.switch input:checked + .slider {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.switch input:checked + .slider:before {
    transform: translateX(22px);
    background-color: white;
}

.switch input:focus + .slider {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

.owner-section h3 {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.owner-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.owner-list li {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 13px;
}

.owner-list li .owner-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.owner-list li .remove-owner {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
    margin-left: 2px;
    line-height: 1;
    opacity: 0.6;
    transition: opacity var(--transition-fast);
}

.owner-list li .remove-owner:hover,
.owner-list li .remove-owner:active {
    opacity: 1;
    color: var(--danger);
}

.add-owner-btn {
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 44px;
}

.add-owner-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Legal Links */
.legal-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 20px;
    margin-top: 16px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
}

.legal-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.legal-links a:hover {
    color: var(--accent-primary);
}

.legal-links span {
    color: var(--border-color);
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-left: 280px;
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Welcome Screen */
.welcome-screen {
    display: none;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 40px 20px;
}

.welcome-screen.active {
    display: flex;
}

.welcome-content {
    text-align: center;
    max-width: 400px;
}

.welcome-icon {
    font-size: 80px;
    margin-bottom: 24px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.welcome-content h2 {
    font-family: var(--font-display);
    font-size: 28px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-content p {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.welcome-btn {
    margin-top: 24px;
}

/* Property View */
.property-view {
    display: none;
    padding: 24px 20px;
    padding-bottom: calc(24px + var(--safe-area-bottom));
    animation: fadeIn 0.3s ease;
}

.property-view.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.property-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    gap: 12px;
}

.property-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.property-title h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    word-break: break-word;
}

.property-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.property-badge.home {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
    color: var(--accent-primary);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.property-badge.rental {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.1));
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.property-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.icon-btn {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.icon-btn:hover,
.icon-btn:active {
    background: var(--bg-hover);
    border-color: var(--border-light);
}

.icon-btn.danger:hover,
.icon-btn.danger:active {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
}

/* Task Filters */
.task-filters {
    margin-bottom: 24px;
    margin-left: -20px;
    margin-right: -20px;
    padding: 0 20px;
}

.filter-scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 4px 0;
}

.filter-scroll::-webkit-scrollbar {
    display: none;
}

.filter-btn {
    padding: 10px 18px;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    min-height: 44px;
}

.filter-btn:hover,
.filter-btn:active {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.filter-btn.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-color: transparent;
    color: white;
    box-shadow: var(--shadow-glow);
}

/* Task Categories */
.tasks-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.task-category {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
}

.category-header h3 {
    font-size: 15px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.add-task-btn {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    min-height: 36px;
}

.add-task-btn:hover,
.add-task-btn:active {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Task Items */
.task-list {
    padding: 12px;
}

.task-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    border-radius: var(--radius-md);
    background: var(--bg-secondary);
    margin-bottom: 8px;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.task-item:last-child {
    margin-bottom: 0;
}

.task-item:active {
    background: var(--bg-hover);
    border-color: var(--border-color);
}

.task-item.overdue {
    border-left: 3px solid var(--danger);
}

.task-item.due-soon {
    border-left: 3px solid var(--warning);
}

.task-item.completed {
    opacity: 0.6;
}

/* Complete Task Button */
.complete-task-btn {
    padding: 10px 16px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.complete-task-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.complete-task-btn:active {
    transform: translateY(0);
}

.task-info {
    flex: 1;
    min-width: 0;
}

.task-name {
    font-weight: 500;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    word-break: break-word;
}

.task-name .photo-icon {
    font-size: 12px;
    opacity: 0.7;
}

.task-item.completed .task-name {
    text-decoration: line-through;
    color: var(--text-muted);
}

.task-meta {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
}

.task-meta .overdue {
    color: var(--danger);
    font-weight: 500;
}

.task-meta .due-soon {
    color: var(--warning);
    font-weight: 500;
}

.task-assignee {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 8px;
}

.task-assignee .assignee-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.task-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.task-action-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.task-action-btn:hover,
.task-action-btn:active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.task-action-btn.danger:hover,
.task-action-btn.danger:active {
    color: var(--danger);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state .empty-icon {
    font-size: 40px;
    margin-bottom: 12px;
    opacity: 0.5;
}

/* ===== Install Banner ===== */
.install-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 16px 20px;
    padding-bottom: calc(16px + var(--safe-area-bottom));
    z-index: 300;
    animation: slideUp 0.3s ease;
}

.install-banner.active {
    display: block;
}

.install-content {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 600px;
    margin: 0 auto;
}

.install-content span {
    font-size: 14px;
}

.install-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

/* ===== Modals ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: flex-end;
    justify-content: center;
    padding: 0;
    animation: fadeIn 0.2s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border: 1px solid var(--border-color);
    border-bottom: none;
    width: 100%;
    max-width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(100%); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 10;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: var(--border-light);
    border-radius: 2px;
}

.modal-header h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 600;
}

.close-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.close-btn:hover,
.close-btn:active {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

/* ===== Forms ===== */
form {
    padding: 20px;
    padding-bottom: calc(20px + var(--safe-area-bottom));
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.form-row .form-group.flex-2 {
    flex: 2;
}

.form-row .form-group.flex-1 {
    flex: 1;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

input[type="text"],
input[type="number"],
input[type="date"],
select,
textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px; /* Prevents zoom on iOS */
    transition: all var(--transition-fast);
    -webkit-appearance: none;
    appearance: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

.frequency-input {
    display: flex;
    gap: 8px;
}

.frequency-input input {
    width: 80px;
    flex-shrink: 0;
}

.frequency-input select {
    flex: 1;
}

/* Radio Cards */
.radio-group {
    display: flex;
    gap: 12px;
}

.radio-card {
    flex: 1;
    cursor: pointer;
}

.radio-card input {
    display: none;
}

.radio-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 20px 16px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.radio-card input:checked + .radio-card-content {
    border-color: var(--accent-primary);
    background: rgba(34, 197, 94, 0.1);
}

.radio-card:active .radio-card-content {
    border-color: var(--border-light);
}

.radio-icon {
    font-size: 28px;
}

/* Checkbox */
.checkbox-group {
    margin-top: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    padding: 8px 0;
}

.checkbox-label input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--accent-primary);
}

/* Color Picker */
.color-picker {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.color-option {
    cursor: pointer;
}

.color-option input {
    display: none;
}

.color-swatch {
    display: block;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid transparent;
    transition: all var(--transition-fast);
}

.color-option input:checked + .color-swatch {
    border-color: white;
    transform: scale(1.1);
    box-shadow: 0 0 0 3px var(--bg-tertiary);
}

/* Icon Picker */
.icon-picker {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.icon-option {
    cursor: pointer;
}

.icon-option input {
    display: none;
}

.icon-swatch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    font-size: 24px;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.icon-option input:checked + .icon-swatch {
    border-color: var(--accent-primary);
    background: rgba(34, 197, 94, 0.1);
    transform: scale(1.05);
}

.icon-option:hover .icon-swatch {
    border-color: var(--border-light);
}

/* Add Category Button */
.add-category-btn {
    width: 100%;
    padding: 16px 20px;
    margin-top: 16px;
    background: transparent;
    border: 2px dashed var(--border-light);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.add-category-btn:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: rgba(34, 197, 94, 0.05);
}

.add-category-btn:active {
    transform: scale(0.99);
}

.add-category-btn span {
    font-size: 20px;
    font-weight: 300;
}

/* Category Header Edit Button */
.category-edit-btn {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    opacity: 0;
    margin-left: auto;
}

.category-header:hover .category-edit-btn {
    opacity: 1;
}

.category-edit-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* Buttons */
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 8px;
}

.btn {
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    min-height: 48px;
}

.btn.primary {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn.primary:hover,
.btn.primary:active {
    transform: translateY(-1px);
    box-shadow: var(--shadow-glow);
}

.btn.secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn.secondary:hover,
.btn.secondary:active {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn.danger {
    background: var(--danger);
    color: white;
}

.btn.danger:hover,
.btn.danger:active {
    background: #dc2626;
}

/* ===== Desktop Styles ===== */
@media (min-width: 769px) {
    .mobile-header {
        display: none !important;
    }
    
    .sidebar-overlay {
        display: none !important;
    }
    
    .sidebar {
        transform: none !important;
    }
    
    .main-content {
        margin-left: 280px;
    }
    
    .property-view {
        padding: 32px 40px;
    }
    
    .task-filters {
        margin-left: 0;
        margin-right: 0;
        padding: 0;
    }
    
    .property-title h2 {
        font-size: 28px;
    }
    
    /* Desktop modals - centered */
    .modal {
        align-items: center;
        padding: 20px;
    }
    
    .modal-content {
        border-radius: var(--radius-lg);
        border: 1px solid var(--border-color);
        max-width: 480px;
    }
    
    .modal-content.modal-lg {
        max-width: 560px;
    }
    
    .modal-content.modal-sm {
        max-width: 380px;
    }
    
    .modal-header::before {
        display: none;
    }
    
    @keyframes slideUp {
        from { opacity: 0; transform: translateY(20px); }
        to { opacity: 1; transform: translateY(0); }
    }
    
    /* Show edit/delete on hover only, complete button always visible */
    .task-action-btn {
        opacity: 0;
        transition: opacity var(--transition-fast);
    }
    
    .task-item:hover .task-action-btn {
        opacity: 1;
    }
    
    .complete-task-btn {
        opacity: 1;
    }
}

/* ===== Mobile Styles ===== */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        width: 300px;
        padding-top: calc(60px + var(--safe-area-top));
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar .logo {
        display: none;
    }
    
    .sidebar-overlay.active {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
        padding-top: calc(60px + var(--safe-area-top));
    }
    
    .welcome-icon {
        font-size: 60px;
    }
    
    .welcome-content h2 {
        font-size: 24px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .task-item {
        flex-wrap: wrap;
    }
    
    .task-actions {
        opacity: 1;
        width: 100%;
        justify-content: flex-end;
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid var(--border-color);
    }
    
    .task-action-btn {
        opacity: 1;
    }
    
    .complete-task-btn {
        flex: 1;
        max-width: 150px;
    }
    
    .category-edit-btn {
        opacity: 1;
    }
    
    .task-assignee {
        margin-top: 0;
    }
}

/* ===== Scrollbar (Desktop) ===== */
@media (min-width: 769px) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    ::-webkit-scrollbar-track {
        background: var(--bg-primary);
    }

    ::-webkit-scrollbar-thumb {
        background: var(--border-light);
        border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--text-muted);
    }
}

/* ===== Toast Notification ===== */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    left: 24px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    padding: 16px 24px;
    border-radius: var(--radius-md);
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    text-align: center;
}

@media (min-width: 769px) {
    .toast {
        left: auto;
        max-width: 400px;
    }
}
