/* ================================================
   OCORRÊNCIA COLIBRI - Apple UX Design System
   ================================================ */

/* CSS Variables - Apple Color Palette */
:root {
    /* Primary Colors */
    --apple-blue: #007AFF;
    --apple-blue-hover: #0056CC;
    --apple-green: #34C759;
    --apple-orange: #FF9500;
    --apple-red: #FF3B30;
    --apple-purple: #AF52DE;
    --apple-pink: #FF2D55;
    --apple-teal: #5AC8FA;

    /* Neutral Colors - Light Mode */
    --bg-primary: #FFFFFF;
    --bg-secondary: #F2F2F7;
    --bg-tertiary: #E5E5EA;
    --bg-elevated: #FFFFFF;

    /* Text Colors */
    --text-primary: #1D1D1F;
    --text-secondary: #86868B;
    --text-tertiary: #AEAEB2;

    /* Borders & Separators */
    --separator: rgba(60, 60, 67, 0.12);
    --border-color: rgba(0, 0, 0, 0.08);

    /* Shadows - Apple Style */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.04), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.06), 0 4px 10px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.08), 0 8px 16px rgba(0, 0, 0, 0.06);

    /* Border Radius - Apple Style */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.25s ease;
    --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text',
        'Helvetica Neue', 'Inter', Arial, sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    font-size: 17px;
    line-height: 1.47059;
    font-weight: 400;
    letter-spacing: -0.022em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

.animate-fade-in {
    animation: slideUp 0.5s ease-out forwards;
}

/* ================================================
   HEADER - Premium Apple Navigation Bar
   ================================================ */
.header-apple {
    background: linear-gradient(135deg, #1D1D1F 0%, #2C2C2E 100%);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0 24px;
    height: 64px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08),
        0 4px 20px rgba(0, 0, 0, 0.15);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.header-logo:hover {
    opacity: 0.9;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.35);
}

.logo-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

.logo-text {
    font-size: 18px;
    font-weight: 600;
    color: white;
    letter-spacing: -0.02em;
}

/* Navigation */
.header-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.nav-btn svg {
    width: 18px;
    height: 18px;
}

.nav-btn:hover {
    color: white;
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
}

.nav-btn.active {
    color: white;
    background: rgba(0, 122, 255, 0.25);
    border-color: rgba(0, 122, 255, 0.4);
}

/* Primary Button - Nova Ocorrência */
.nav-btn-primary {
    color: white;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    border: none;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.35);
}

.nav-btn-primary:hover {
    background: linear-gradient(135deg, #0056CC 0%, #4745B5 100%);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.45);
    transform: translateY(-1px);
}

/* Admin Button */
.header-admin {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.05);
    transition: all var(--transition-fast);
}

.header-admin svg {
    width: 20px;
    height: 20px;
}

.header-admin:hover {
    color: white;
    background: rgba(255, 255, 255, 0.12);
}

/* Legacy header support */
.header {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--separator);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 24px;
}

.logo {
    font-size: 21px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.02em;
}

.logo svg {
    color: var(--apple-blue);
}

/* Tab Buttons */
.tab-btn {
    padding: 8px 16px;
    border-radius: var(--radius-lg);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.tab-btn:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.tab-btn.active {
    color: var(--apple-blue);
    background: rgba(0, 122, 255, 0.1);
}

/* ================================================
   CARDS - Apple Card Style
   ================================================ */
.glass-card {
    background: var(--bg-elevated);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.glass-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* ================================================
   WIZARD STEPS
   ================================================ */
.wizard-container {
    max-width: 680px;
    margin: 0 auto;
}

.step-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.step-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 100px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.step-indicator.active {
    background: var(--apple-blue);
    border-color: var(--apple-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.step-indicator.completed {
    background: rgba(52, 199, 89, 0.1);
    border-color: var(--apple-green);
    color: var(--apple-green);
}

.step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 13px;
}

.step-indicator.active .step-number {
    background: rgba(255, 255, 255, 0.2);
}

/* ================================================
   FORM INPUTS - Apple Style
   ================================================ */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 15px;
    color: var(--text-primary);
}

.form-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    background: var(--bg-elevated);
    color: var(--text-primary);
    font-size: 17px;
    font-family: inherit;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.form-input:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

textarea.form-input {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}

/* Select - Apple Style */
.form-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2386868B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 20px;
    padding-right: 44px;
    cursor: pointer;
}

.form-select:focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23007AFF' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
}

.form-select option {
    background: var(--bg-elevated);
    color: var(--text-primary);
    padding: 12px;
}

/* Location Select Cards */
.location-select-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.location-select-card {
    padding: 20px;
    border-radius: var(--radius-xl);
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.location-select-card:hover {
    border-color: rgba(0, 122, 255, 0.3);
    box-shadow: var(--shadow-md);
}

.location-select-card:focus-within {
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.15);
}

.location-select-card .card-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: rgba(0, 122, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: all var(--transition-normal);
}

.location-select-card:focus-within .card-icon {
    background: var(--apple-blue);
}

.location-select-card .card-icon svg {
    width: 22px;
    height: 22px;
    color: var(--apple-blue);
}

.location-select-card:focus-within .card-icon svg {
    color: white;
}

.location-select-card .card-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.location-select-card .form-select {
    background-color: var(--bg-secondary);
    border-color: transparent;
    font-weight: 500;
}

.location-select-card .form-select:focus {
    background-color: var(--bg-elevated);
    border-color: var(--apple-blue);
}

/* ================================================
   BUTTONS - Apple Style
   ================================================ */
.btn {
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 17px;
    font-family: inherit;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn-primary {
    background: var(--apple-blue);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.25);
}

.btn-primary:hover {
    background: var(--apple-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: #D1D1D6;
}

.btn-success {
    background: var(--apple-green);
    color: white;
}

.btn-success:hover {
    background: #2DB550;
}

.btn-ai {
    background: linear-gradient(135deg, var(--apple-purple), var(--apple-pink));
    color: white;
    box-shadow: 0 4px 12px rgba(175, 82, 222, 0.25);
}

.btn-ai:hover {
    box-shadow: 0 6px 16px rgba(175, 82, 222, 0.35);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
}

/* ================================================
   CATEGORY GRID - Apple Style
   ================================================ */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.category-card {
    padding: 20px 16px;
    border-radius: var(--radius-xl);
    background: var(--bg-elevated);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.category-card.selected {
    border-color: var(--apple-blue);
    background: rgba(0, 122, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.category-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.category-icon svg {
    width: 28px;
    height: 28px;
}

.category-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* ================================================
   TIMELINE - Apple Card List Style
   ================================================ */
.timeline-container {
    max-width: 700px;
    margin: 0 auto;
}

.timeline-card {
    padding: 20px;
    margin-bottom: 16px;
    cursor: pointer;
}

.timeline-card:hover {
    transform: translateY(-2px);
}

.timeline-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    color: white;
    flex-shrink: 0;
}

.timeline-info h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.timeline-meta {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.timeline-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 12px;
}

.timeline-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.timeline-content {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 15px;
}

.timeline-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--separator);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Status Colors */
.status-pendente {
    background: rgba(255, 149, 0, 0.15);
    color: #CC7700;
}

.status-em_andamento {
    background: rgba(0, 122, 255, 0.15);
    color: var(--apple-blue);
}

.status-resolvido {
    background: rgba(52, 199, 89, 0.15);
    color: #248A3D;
}

.status-cancelado {
    background: rgba(255, 59, 48, 0.15);
    color: #D70015;
}

/* ================================================
   VISIBILITY TOGGLE - Apple Segmented Control Style
   ================================================ */
.visibility-toggle {
    display: flex;
    gap: 12px;
}

.visibility-option {
    flex: 1;
    padding: 20px;
    border-radius: var(--radius-xl);
    background: var(--bg-elevated);
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.visibility-option:hover {
    border-color: rgba(0, 122, 255, 0.3);
    box-shadow: var(--shadow-md);
}

.visibility-option.selected {
    border-color: var(--apple-blue);
    background: rgba(0, 122, 255, 0.05);
}

.visibility-option input {
    display: none;
}

.visibility-icon {
    margin-bottom: 8px;
}

.visibility-icon svg {
    width: 32px;
    height: 32px;
    color: var(--text-secondary);
}

.visibility-option.selected .visibility-icon svg {
    color: var(--apple-blue);
}

.visibility-title {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.visibility-desc {
    font-size: 13px;
    color: var(--text-secondary);
}

/* ================================================
   LOADING & SPINNER
   ================================================ */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================================
   MODAL - Apple Sheet Style
   ================================================ */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-elevated);
    border-radius: var(--radius-2xl);
    padding: 28px;
    max-width: 480px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95) translateY(10px);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

/* ================================================
   SUCCESS ANIMATION
   ================================================ */
.success-animation {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--apple-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(52, 199, 89, 0.3);
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

/* ================================================
   EMPTY STATE
   ================================================ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    margin-bottom: 20px;
    opacity: 0.4;
}

.empty-icon svg {
    width: 64px;
    height: 64px;
    color: var(--text-secondary);
}

/* ================================================
   TABS - Apple Segmented Control
   ================================================ */
.tabs {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
}

.tab {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all var(--transition-fast);
    background: transparent;
    border: none;
    color: var(--text-secondary);
}

.tab:hover {
    color: var(--text-primary);
}

.tab.active {
    background: var(--bg-elevated);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* ================================================
   ADMIN SIDEBAR
   ================================================ */
.nav-item {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-fast);
    background: transparent;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.nav-item:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(0, 122, 255, 0.1);
    color: var(--apple-blue);
}

.nav-item svg {
    width: 20px;
    height: 20px;
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .header {
        padding: 10px 16px;
    }

    .step-indicators {
        flex-wrap: wrap;
        gap: 6px;
    }

    .step-indicator {
        padding: 8px 14px;
        font-size: 13px;
    }

    .step-indicator span:last-child {
        display: none;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .location-select-group {
        grid-template-columns: 1fr;
    }

    .visibility-toggle {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        padding: 16px;
    }

    .glass-card {
        border-radius: var(--radius-lg);
    }

    /* Admin Mobile Enhancements */
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        width: 280px;
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.4);
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    /* Overlay for mobile sidebar */
    .sidebar-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        z-index: 99;
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .admin-main {
        margin-left: 0;
        padding: 20px 16px;
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .page-header-actions {
        width: 100%;
    }

    .page-title {
        font-size: 24px;
    }

    /* Mobile Header for Admin */
    .admin-mobile-header {
        display: flex;
        align-items: center;
        gap: 16px;
        margin-bottom: 24px;
        position: sticky;
        top: 0;
        background: var(--bg-secondary);
        z-index: 90;
        padding: 16px 0;
        margin-top: -20px;
        padding-top: 20px;
    }

    .btn-mobile-menu {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: var(--bg-elevated);
        border: 1px solid var(--border-color);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-primary);
        cursor: pointer;
        box-shadow: var(--shadow-sm);
    }

    /* Grids Stacking */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .ocorrencias-filters {
        padding: 12px;
        flex-direction: column;
        align-items: stretch;
    }

    .filter-select {
        width: 100%;
    }
    
    .moradores-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-chips {
        flex-direction: column;
    }
    
    .search-box {
        width: 100%;
    }

    /* Table Responsive */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
        width: calc(100% + 32px);
    }

    .admin-table {
        min-width: 800px; /* Ensure table doesn't squish */
    }
    
    /* Ocorrencia Card Mobile */
    .ocorrencia-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ocorrencia-badges {
        width: 100%;
        flex-wrap: wrap;
    }
    
    .status-badge-admin {
        margin-left: auto;
    }
}

/* ================================================
   SCROLLBAR - Apple Style
   ================================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* ================================================
   UTILITY CLASSES
   ================================================ */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--text-primary);
}

.text-secondary {
    color: var(--text-secondary);
}

.p-4 {
    padding: 16px;
}

.p-6 {
    padding: 24px;
}

.p-8 {
    padding: 32px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-6 {
    margin-bottom: 24px;
}

.mb-8 {
    margin-bottom: 32px;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.gap-4 {
    gap: 16px;
}

.flex {
    display: flex;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.grid {
    display: grid;
}

.grid-cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.w-full {
    width: 100%;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.text-sm {
    font-size: 14px;
}

.text-lg {
    font-size: 18px;
}

.text-xl {
    font-size: 20px;
}

.text-2xl {
    font-size: 24px;
}

.text-3xl {
    font-size: 30px;
}

.text-4xl {
    font-size: 36px;
}

/* Color utilities */
.text-white\/50 {
    color: var(--text-secondary);
}

.text-white\/60 {
    color: var(--text-secondary);
}

.text-white\/70 {
    color: var(--text-secondary);
}

.text-yellow-400 {
    color: var(--apple-orange);
}

.text-blue-400 {
    color: var(--apple-blue);
}

.text-green-400 {
    color: var(--apple-green);
}

.text-red-400 {
    color: var(--apple-red);
}

.bg-white\/5 {
    background: var(--bg-secondary);
}

.bg-white\/10 {
    background: var(--bg-tertiary);
}

/* ================================================
   ADMIN DASHBOARD - Premium Design
   ================================================ */

/* Admin Sidebar */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 280px;
    background: linear-gradient(180deg, #1D1D1F 0%, #0D0D0F 100%);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.sidebar-logo-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.sidebar-logo-text {
    display: flex;
    flex-direction: column;
}

.sidebar-title {
    font-size: 16px;
    font-weight: 700;
    color: white;
    line-height: 1.2;
}

.sidebar-subtitle {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    padding: 20px 12px;
    overflow-y: auto;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-section-title {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0 12px;
    margin-bottom: 8px;
}

.sidebar-nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 12px;
    border-radius: 10px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    font-weight: 500;
    text-align: left;
}

.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

.sidebar-nav-item.active {
    background: rgba(0, 122, 255, 0.15);
    color: #007AFF;
}

.sidebar-nav-item .nav-icon {
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sidebar-nav-item.active .nav-icon {
    background: rgba(0, 122, 255, 0.2);
}

.sidebar-nav-item svg {
    width: 18px;
    height: 18px;
}

.nav-badge {
    margin-left: auto;
    background: #FF3B30;
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    display: none;
}

.nav-badge:not(:empty) {
    display: inline-block;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin-bottom: 12px;
}

.admin-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #5856D6 0%, #AF52DE 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-avatar svg {
    width: 20px;
    height: 20px;
    color: white;
}

.admin-details {
    flex: 1;
    min-width: 0;
}

.admin-name {
    font-size: 14px;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-logout {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 59, 48, 0.1);
    border: none;
    border-radius: 10px;
    color: #FF3B30;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sidebar-logout:hover {
    background: rgba(255, 59, 48, 0.2);
}

.sidebar-logout svg {
    width: 18px;
    height: 18px;
}

/* Admin Main Content */
.admin-main {
    margin-left: 280px;
    min-height: 100vh;
    background: var(--bg-secondary);
    padding: 32px 40px;
}

/* Page Header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.header-date {
    font-size: 14px;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--bg-elevated);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-card-icon svg {
    width: 26px;
    height: 26px;
}

.stat-card-total .stat-card-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.15) 100%);
    color: #6366F1;
}

.stat-card-pending .stat-card-icon {
    background: rgba(255, 149, 0, 0.15);
    color: #FF9500;
}

.stat-card-progress .stat-card-icon {
    background: rgba(0, 122, 255, 0.15);
    color: #007AFF;
}

.stat-card-resolved .stat-card-icon {
    background: rgba(52, 199, 89, 0.15);
    color: #34C759;
}

.stat-card-content {
    flex: 1;
    min-width: 0;
}

.stat-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.stat-card-trend {
    position: absolute;
    top: 16px;
    right: 16px;
    color: #34C759;
}

.stat-card-trend svg {
    width: 20px;
    height: 20px;
}

.stat-card-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.stat-card-indicator.pending {
    background: linear-gradient(90deg, #FF9500 0%, #FF5E3A 100%);
}

.stat-card-indicator.progress {
    background: linear-gradient(90deg, #007AFF 0%, #5AC8FA 100%);
}

.stat-card-indicator.resolved {
    background: linear-gradient(90deg, #34C759 0%, #30D158 100%);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.dashboard-card {
    background: var(--bg-elevated);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.dashboard-card .card-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--separator);
}

.dashboard-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.dashboard-card .card-title svg {
    width: 20px;
    height: 20px;
    color: var(--apple-blue);
}

.dashboard-card .card-body {
    padding: 20px 24px;
}

/* Category Stats List */
.category-stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.category-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-secondary);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.category-stat-item:hover {
    background: var(--bg-tertiary);
}

.category-stat-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-stat-icon svg {
    width: 18px;
    height: 18px;
}

.category-stat-name {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.category-stat-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-elevated);
    padding: 4px 10px;
    border-radius: 6px;
}

/* Activity List */
.activity-list {
    min-height: 200px;
}

.empty-activity {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.empty-activity svg {
    width: 48px;
    height: 48px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.empty-activity p {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* Category Stats - Dashboard */
.category-stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: var(--bg-secondary);
    border-radius: 12px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.category-stat-row:last-child {
    margin-bottom: 0;
}

.category-stat-row:hover {
    background: var(--bg-tertiary);
}

.category-stat-info {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.category-stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-stat-icon svg {
    width: 20px;
    height: 20px;
}

.category-stat-details {
    flex: 1;
    min-width: 0;
}

.category-stat-name {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.category-stat-bar {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.category-stat-progress {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.category-stat-numbers {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    margin-left: 16px;
}

.category-stat-count {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.category-stat-percent {
    font-size: 12px;
    color: var(--text-tertiary);
}

.empty-categories {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.empty-categories svg {
    width: 40px;
    height: 40px;
    color: var(--text-tertiary);
    margin-bottom: 12px;
}

.empty-categories p {
    font-size: 14px;
    color: var(--text-tertiary);
}

/* Activity Items - Dashboard */
.activity-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--separator);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.activity-user {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.activity-time {
    font-size: 12px;
    color: var(--text-tertiary);
}

.activity-text {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 8px 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activity-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-category {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-tertiary);
}

.activity-category svg {
    width: 12px;
    height: 12px;
}

.activity-status {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.activity-status.status-pendente {
    background: rgba(255, 149, 0, 0.12);
    color: #FF9500;
}

.activity-status.status-em_andamento {
    background: rgba(0, 122, 255, 0.12);
    color: #007AFF;
}

.activity-status.status-resolvido {
    background: rgba(52, 199, 89, 0.12);
    color: #34C759;
}

.activity-status.status-cancelado {
    background: rgba(142, 142, 147, 0.12);
    color: #8E8E93;
}

/* Filter Group */
.filter-group {
    display: flex;
    gap: 12px;
}

/* Ocorrências Filters Bar */
.ocorrencias-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--bg-elevated);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.ocorrencias-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: 8px;
}

.filter-select {
    padding: 10px 36px 10px 14px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2386868B' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all 0.2s ease;
}

.filter-select:hover {
    border-color: var(--apple-blue);
}

.filter-select:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

/* Moradores Filters */
.moradores-filters {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box {
    flex: 1;
    min-width: 250px;
    position: relative;
}

.search-box svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 12px 14px 12px 44px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.15);
}

.search-box input::placeholder {
    color: var(--text-tertiary);
}

.filter-chips {
    display: flex;
    gap: 12px;
}

.moradores-count {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 8px 16px;
    border-radius: 8px;
}

/* Sortable Table Header */
.sortable-table th.sortable {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition: all 0.2s ease;
}

.sortable-table th.sortable:hover {
    background: var(--bg-tertiary);
}

.sortable-table th.sortable span {
    display: inline;
}

.sortable-table th.sortable .sort-icon {
    width: 14px;
    height: 14px;
    margin-left: 6px;
    color: var(--text-tertiary);
    vertical-align: middle;
    transition: all 0.2s ease;
}

.sortable-table th.sorted-asc .sort-icon,
.sortable-table th.sorted-desc .sort-icon {
    color: var(--apple-blue);
}

.sortable-table th.sorted-asc .sort-icon {
    transform: rotate(180deg);
}

/* Morador Cell Styles */
.morador-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.morador-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: white;
    flex-shrink: 0;
}

.morador-nome {
    font-weight: 500;
    color: var(--text-primary);
}

.bloco-badge {
    background: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.apto-badge {
    font-weight: 600;
    color: var(--text-primary);
}

.whatsapp-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 13px;
}

.whatsapp-cell svg {
    width: 14px;
    height: 14px;
    color: var(--apple-green);
}

/* Table Cell States */
.loading-cell,
.error-cell,
.empty-cell {
    text-align: center;
    padding: 40px !important;
}

.loading-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.loading-cell span,
.error-cell span,
.empty-cell span {
    font-size: 14px;
    color: var(--text-secondary);
}

.error-cell {
    color: var(--apple-red);
}

.error-cell svg,
.empty-cell svg {
    width: 32px;
    height: 32px;
    color: var(--text-tertiary);
    margin-bottom: 8px;
}

/* Ocorrências List */
.ocorrencias-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    gap: 16px;
}

.loading-state p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Empty State Card */
.empty-state-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: var(--bg-elevated);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    text-align: center;
}

.empty-state-card .empty-icon {
    width: 64px;
    height: 64px;
    background: var(--bg-secondary);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.empty-state-card .empty-icon svg {
    width: 32px;
    height: 32px;
    color: var(--text-tertiary);
}

.empty-state-card h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state-card p {
    font-size: 14px;
    color: var(--text-secondary);
}

/* Ocorrência Card - Apple Style */
.ocorrencia-card {
    background: var(--bg-elevated);
    border-radius: 20px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.25s ease;
}

.ocorrencia-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Card Header */
.ocorrencia-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 20px 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--separator);
    gap: 16px;
}

.ocorrencia-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ocorrencia-avatar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}

.ocorrencia-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ocorrencia-user-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.ocorrencia-user-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.ocorrencia-user-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary);
}

.ocorrencia-user-meta svg {
    width: 14px;
    height: 14px;
}

.ocorrencia-user-meta .user-type {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ocorrencia-user-meta .user-type.proprietario {
    background: rgba(0, 122, 255, 0.12);
    color: #007AFF;
}

.ocorrencia-user-meta .user-type.inquilino {
    background: rgba(255, 149, 0, 0.12);
    color: #FF9500;
}

/* Badges */
.ocorrencia-badges {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.visibility-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
}

.visibility-badge svg {
    width: 12px;
    height: 12px;
}

.visibility-badge.private {
    background: rgba(175, 82, 222, 0.12);
    color: #AF52DE;
}

.status-badge-admin {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge-admin.status-pendente {
    background: rgba(255, 149, 0, 0.12);
    color: #FF9500;
}

.status-badge-admin.status-em_andamento {
    background: rgba(0, 122, 255, 0.12);
    color: #007AFF;
}

.status-badge-admin.status-resolvido {
    background: rgba(52, 199, 89, 0.12);
    color: #34C759;
}

.status-badge-admin.status-cancelado {
    background: rgba(142, 142, 147, 0.12);
    color: #8E8E93;
}

/* Card Body */
.ocorrencia-body {
    padding: 24px;
}

.ocorrencia-category {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: color-mix(in srgb, var(--cat-color) 12%, transparent);
    border-radius: 8px;
    margin-bottom: 16px;
}

.ocorrencia-category svg {
    width: 16px;
    height: 16px;
    color: var(--cat-color);
}

.ocorrencia-category span {
    font-size: 13px;
    font-weight: 500;
    color: var(--cat-color);
}

.ocorrencia-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.ocorrencia-desc {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Response Box */
.ocorrencia-response {
    margin-top: 20px;
    padding: 16px;
    background: rgba(52, 199, 89, 0.08);
    border: 1px solid rgba(52, 199, 89, 0.2);
    border-radius: 12px;
}

.response-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.response-header svg {
    width: 16px;
    height: 16px;
    color: #34C759;
}

.response-header span {
    font-size: 13px;
    font-weight: 600;
    color: #34C759;
}

.response-text {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.5;
    margin: 0;
}

/* Card Footer */
.ocorrencia-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--separator);
}

.ocorrencia-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-tertiary);
}

.ocorrencia-time svg {
    width: 14px;
    height: 14px;
}

/* Respond Button */
.btn-respond {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--apple-blue);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-respond svg {
    width: 16px;
    height: 16px;
}

.btn-respond:hover {
    background: var(--apple-blue-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.pagination button {
    padding: 10px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination button:hover {
    background: var(--bg-tertiary);
}

.pagination button.active {
    background: var(--apple-blue);
    border-color: var(--apple-blue);
    color: white;
}

/* Admin Table */
.table-container {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: var(--bg-secondary);
}

.admin-table th {
    text-align: left;
    padding: 14px 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--separator);
}

.admin-table td {
    padding: 16px 20px;
    font-size: 14px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--separator);
}

.admin-table tbody tr:hover {
    background: var(--bg-secondary);
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* Badge */
.type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.type-badge.proprietario {
    background: rgba(0, 122, 255, 0.15);
    color: #007AFF;
}

.type-badge.inquilino {
    background: rgba(255, 149, 0, 0.15);
    color: #FF9500;
}

/* Settings Grid */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.settings-card {
    background: var(--bg-elevated);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.settings-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--separator);
}

.settings-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.settings-card-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.settings-card-icon.ai {
    background: linear-gradient(135deg, #5856D6 0%, #AF52DE 100%);
}

.settings-card-icon.condo {
    background: linear-gradient(135deg, #007AFF 0%, #5AC8FA 100%);
}

.settings-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
}

.settings-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.settings-card-body {
    padding: 24px;
}

.settings-card-body .form-group {
    margin-bottom: 20px;
}

.settings-card-body .btn {
    width: 100%;
}

.form-hint {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 8px;
}

.form-hint a {
    color: var(--apple-blue);
    text-decoration: none;
}

.form-hint a:hover {
    text-decoration: underline;
}

/* Modal Styles for Admin */
.admin-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.admin-modal.active {
    display: flex;
}

.admin-modal-content {
    background: var(--bg-elevated);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.admin-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--separator);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.admin-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--bg-secondary);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.admin-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.admin-modal-body {
    padding: 24px;
}

.admin-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--separator);
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-color);
    border-top-color: var(--apple-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ================================================
   RESPONSIVE DESIGN - Complete System
   ================================================ */

/* === DESKTOP LARGE (1200px+) === */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
        margin: 0 auto;
    }

    .wizard-container {
        max-width: 720px;
    }

    .timeline-container {
        max-width: 800px;
    }

    .category-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .glass-card {
        padding: 32px;
    }
}

/* === DESKTOP MEDIUM (992px - 1199px) === */
@media (min-width: 992px) and (max-width: 1199px) {
    .category-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .wizard-container {
        max-width: 680px;
    }
}

/* === TABLET (768px - 991px) === */
@media (min-width: 768px) and (max-width: 991px) {
    body {
        font-size: 16px;
    }

    .header-apple {
        padding: 0 20px;
    }

    .category-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .wizard-container {
        max-width: 600px;
        padding: 0 20px;
    }

    .timeline-container {
        max-width: 100%;
        padding: 0 20px;
    }

    .glass-card {
        padding: 24px;
        border-radius: var(--radius-lg);
    }

    .location-select-group {
        gap: 12px;
    }

    .step-indicator span:last-child {
        font-size: 13px;
    }
}

/* === MOBILE LARGE (576px - 767px) === */
@media (min-width: 576px) and (max-width: 767px) {
    body {
        font-size: 16px;
    }

    /* Header */
    .header-apple {
        padding: 0 16px;
        height: 56px;
    }

    .logo-text {
        font-size: 16px;
    }

    .logo-icon {
        width: 36px;
        height: 36px;
    }

    .logo-icon svg {
        width: 20px;
        height: 20px;
    }

    .nav-btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    .header-admin {
        width: 36px;
        height: 36px;
    }

    /* Content */
    .wizard-container,
    .timeline-container {
        padding: 0 16px;
        max-width: 100%;
    }

    .glass-card {
        padding: 20px;
        border-radius: var(--radius-md);
    }

    .step-indicators {
        flex-wrap: wrap;
        gap: 6px;
    }

    .step-indicator {
        padding: 8px 14px;
        font-size: 13px;
    }

    .step-indicator span:last-child {
        display: none;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .category-card {
        padding: 16px 12px;
    }

    .category-icon svg {
        width: 24px;
        height: 24px;
    }

    .category-name {
        font-size: 13px;
    }

    .location-select-group {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .visibility-toggle {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
        padding: 14px 20px;
    }

    .text-2xl {
        font-size: 22px;
    }

    .text-3xl {
        font-size: 26px;
    }
}

/* === MOBILE SMALL (< 576px) === */
@media (max-width: 575px) {
    body {
        font-size: 15px;
        line-height: 1.5;
    }

    /* Header Mobile */
    .header-apple {
        padding: 0 12px;
        height: 52px;
    }

    .logo-text {
        display: none;
    }

    .logo-icon {
        width: 34px;
        height: 34px;
        border-radius: 8px;
    }

    .logo-icon svg {
        width: 18px;
        height: 18px;
    }

    .header-nav {
        gap: 6px;
    }

    .nav-btn {
        padding: 8px 10px;
        border-radius: 8px;
    }

    .nav-btn span {
        display: none;
    }

    .nav-btn svg {
        width: 20px;
        height: 20px;
    }

    .header-admin {
        width: 34px;
        height: 34px;
    }

    /* Main Content */
    main {
        padding: 16px 0;
    }

    .wizard-container,
    .timeline-container {
        padding: 0 12px;
    }

    /* Cards */
    .glass-card {
        padding: 16px;
        border-radius: var(--radius-md);
        margin: 0 4px;
    }

    /* Step Indicators */
    .step-indicators {
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 4px;
        padding: 0 4px;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .step-indicators::-webkit-scrollbar {
        display: none;
    }

    .step-indicator {
        padding: 6px 10px;
        font-size: 12px;
        flex-shrink: 0;
    }

    .step-indicator span:last-child {
        display: none;
    }

    .step-number {
        width: 22px;
        height: 22px;
        font-size: 12px;
    }

    /* Category Grid */
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }

    .category-card {
        padding: 14px 10px;
        border-radius: var(--radius-md);
    }

    .category-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }

    .category-icon svg {
        width: 22px;
        height: 22px;
    }

    .category-name {
        font-size: 12px;
        line-height: 1.3;
    }

    /* Location Select */
    .location-select-group {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .location-select-card {
        padding: 16px;
    }

    .location-select-card .card-icon {
        width: 40px;
        height: 40px;
    }

    .location-select-card .card-label {
        font-size: 11px;
    }

    .location-select-card .form-select {
        font-size: 15px;
        padding: 12px 36px 12px 12px;
    }

    /* Forms */
    .form-input {
        padding: 12px 14px;
        font-size: 16px;
        /* Prevents zoom on iOS */
        border-radius: var(--radius-sm);
    }

    .form-label {
        font-size: 14px;
        margin-bottom: 6px;
    }

    .form-group {
        margin-bottom: 16px;
    }

    textarea.form-input {
        min-height: 120px;
    }

    /* Visibility Toggle */
    .visibility-toggle {
        flex-direction: column;
        gap: 8px;
    }

    .visibility-option {
        padding: 14px;
    }

    .visibility-icon svg {
        width: 28px;
        height: 28px;
    }

    .visibility-title {
        font-size: 14px;
    }

    .visibility-desc {
        font-size: 12px;
    }

    /* Buttons */
    .btn {
        width: 100%;
        padding: 14px 16px;
        font-size: 16px;
        border-radius: var(--radius-sm);
    }

    /* Timeline */
    .timeline-card {
        padding: 14px;
        margin-bottom: 12px;
    }

    .timeline-header {
        gap: 10px;
        margin-bottom: 10px;
    }

    .avatar {
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .timeline-info h3 {
        font-size: 14px;
    }

    .timeline-meta {
        font-size: 12px;
    }

    .timeline-category {
        padding: 4px 10px;
        font-size: 11px;
    }

    .timeline-title {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .timeline-content {
        font-size: 14px;
        line-height: 1.5;
    }

    .timeline-footer {
        margin-top: 12px;
        padding-top: 12px;
    }

    .status-badge {
        padding: 4px 10px;
        font-size: 10px;
    }

    /* Typography */
    .text-xl {
        font-size: 18px;
    }

    .text-2xl {
        font-size: 20px;
    }

    .text-3xl {
        font-size: 24px;
    }

    .text-4xl {
        font-size: 28px;
    }

    /* Spacing */
    .p-8 {
        padding: 16px;
    }

    .p-6 {
        padding: 14px;
    }

    .mb-8 {
        margin-bottom: 24px;
    }

    .mb-6 {
        margin-bottom: 20px;
    }

    /* Modal Mobile */
    .modal-content {
        padding: 20px;
        border-radius: var(--radius-lg);
        width: 95%;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Empty State */
    .empty-state {
        padding: 40px 16px;
    }

    .empty-icon svg {
        width: 48px;
        height: 48px;
    }

    /* Success Animation */
    .success-icon {
        width: 64px;
        height: 64px;
    }

    .success-icon svg {
        width: 32px;
        height: 32px;
    }
}

/* === TOUCH DEVICE OPTIMIZATIONS === */
@media (hover: none) and (pointer: coarse) {

    /* Larger touch targets */
    .btn {
        min-height: 48px;
    }

    .nav-btn {
        min-height: 44px;
    }

    .category-card {
        min-height: 90px;
    }

    .form-input,
    .form-select {
        min-height: 48px;
    }

    /* Remove hover effects that don't work on touch */
    .glass-card:hover {
        transform: none;
    }

    .category-card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    /* Add active states instead */
    .btn:active {
        transform: scale(0.98);
        opacity: 0.9;
    }

    .category-card:active {
        transform: scale(0.98);
        background: rgba(0, 122, 255, 0.08);
    }

    .nav-btn:active {
        opacity: 0.8;
    }
}

/* === LANDSCAPE MOBILE === */
@media (max-height: 500px) and (orientation: landscape) {
    .header-apple {
        height: 48px;
    }

    .logo-icon {
        width: 32px;
        height: 32px;
    }

    .step-indicators {
        margin-bottom: 16px;
    }

    .glass-card {
        padding: 16px;
    }

    .modal-content {
        max-height: 85vh;
    }
}

/* === DARK MODE SUPPORT (System Preference) === */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #000000;
        --bg-secondary: #1C1C1E;
        --bg-tertiary: #2C2C2E;
        --bg-elevated: #1C1C1E;
        --text-primary: #FFFFFF;
        --text-secondary: #8E8E93;
        --text-tertiary: #636366;
        --separator: rgba(255, 255, 255, 0.15);
        --border-color: rgba(255, 255, 255, 0.1);
    }

    body {
        background: var(--bg-primary);
    }

    .glass-card {
        background: var(--bg-secondary);
        border-color: var(--border-color);
    }

    .form-input {
        background: var(--bg-tertiary);
        border-color: var(--border-color);
        color: var(--text-primary);
    }

    .form-select option {
        background: var(--bg-tertiary);
        color: var(--text-primary);
    }

    .location-select-card {
        background: var(--bg-secondary);
        border-color: var(--border-color);
    }

    .location-select-card .form-select {
        background: var(--bg-tertiary);
    }

    .category-card {
        background: var(--bg-secondary);
        border-color: transparent;
    }

    .visibility-option {
        background: var(--bg-secondary);
        border-color: var(--border-color);
    }

    .btn-secondary {
        background: var(--bg-tertiary);
        color: var(--text-primary);
    }

    .timeline-card {
        background: var(--bg-secondary);
    }

    .modal-content {
        background: var(--bg-secondary);
    }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* === PRINT STYLES === */
@media print {

    .header-apple,
    .header-nav,
    .header-admin,
    .btn,
    .step-indicators {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .glass-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* ================================================
   SCROLLBAR - Apple Style
   ================================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.25);
}

/* Mobile scrollbar */
@media (max-width: 575px) {
    ::-webkit-scrollbar {
        width: 4px;
        height: 4px;
    }
}