/* ========================================
   PREMIUM UNIT GRID & MODALS
   ======================================== */

.unit-folder-container {
    padding: 10px 0;
}

.unit-group {
    margin-bottom: 20px;
}

.unit-group-header {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.unit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
}

/* MINI CARD WITH DEPTH BORDERS */
.unit-mini-card {
    background: white;
    border: 2px solid #e0e0e0;
    /* Thicker border */
    border-radius: 10px;
    padding: 10px 14px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08),
        0 1px 2px rgba(0, 0, 0, 0.05);
    /* Depth */
    min-height: 42px;
    margin-bottom: 6px;
    /* Separation */
    position: relative;
}

/* Separator line for depth */
.unit-mini-card::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 15%;
    right: 15%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
}

.unit-mini-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15),
        0 3px 8px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-color);
    z-index: 5;
}

.unit-mini-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unit-mini-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.1;
    flex: 1;
    text-align: left;
    word-break: break-word;
}

/* Status Colors */
.unit-mini-card.vendido {
    border-color: #FCA5A5;
    background: linear-gradient(135deg, #FEF2F2, #FFFFFF);
}

.unit-mini-card.vendido .unit-mini-icon {
    color: #DC2626;
}

.unit-mini-card.reservado {
    border-color: #FDBA74;
    background: linear-gradient(135deg, #FFF7ED, #FFFFFF);
}

.unit-mini-card.reservado .unit-mini-icon {
    color: #EA580C;
}

.unit-mini-card.disponivel {
    border-color: #86EFAC;
    background: linear-gradient(135deg, #F0FDF4, #FFFFFF);
}

.unit-mini-card.disponivel .unit-mini-icon {
    color: #16A34A;
}

/* PREMIUM MODALS */
.premium-unit-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    backdrop-filter: blur(30px) saturate(200%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium);
    border: 1px solid var(--glass-border);
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.premium-unit-modal.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.premium-editor-modal {
    max-width: 600px;
}

.modal-header-premium {
    padding: 20px 24px;
    background: linear-gradient(to bottom, #ffffff, #f9fafb);
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header-premium h2 {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
}

.modal-header-premium .status-badge {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: 99px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.status-badge.disponivel {
    background: #D1FAE5;
    color: #064E3B;
}

.status-badge.vendido {
    background: #FEE2E2;
    color: #991B1B;
}

.status-badge.reservado {
    background: #FFEDD5;
    color: #9A3412;
}

.modal-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: white;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close-btn:hover {
    background: #f3f4f6;
    transform: rotate(90deg);
}

.modal-content-premium {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.info-block {
    background: white;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.info-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 4px;
}

.info-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
}

.owner-section {
    background: #EFF6FF;
    padding: 16px;
    border-radius: 16px;
    border: 1px solid #BFDBFE;
    position: relative;
    overflow: hidden;
}

.owner-section::before {
    content: '👤';
    position: absolute;
    right: -10px;
    top: -10px;
    font-size: 80px;
    opacity: 0.05;
    pointer-events: none;
}

.action-bar {
    display: flex;
    gap: 12px;
}

.action-btn {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 14px;
}

.btn-edit {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}

.btn-edit:hover {
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
    transform: translateY(-2px);
}

.btn-docs {
    background: white;
    color: var(--text-main);
    border: 1px solid #e5e7eb;
}

.btn-docs:hover {
    background: #f9fafb;
}

/* EDITOR FORM */
.editor-form-group {
    margin-bottom: 16px;
}

.editor-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.editor-form-group input,
.editor-form-group select {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
}

.editor-form-group input:focus,
.editor-form-group select:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

.editor-form-group textarea {
    width: 100%;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s;
    resize: vertical;
}

.editor-form-group textarea:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}

/* Gallery Preview */
.gallery-preview-container {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 0;
    margin-top: 8px;
    min-height: 80px;
    border-top: 1px dashed #e5e7eb;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e1 transparent;
}

.gallery-preview-container::-webkit-scrollbar {
    height: 4px;
}

.gallery-preview-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

.gallery-preview-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.gallery-empty-state {
    color: var(--text-secondary);
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

/* Premium Checkbox */
.premium-checkbox-group {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.premium-checkbox-group:hover {
    border-color: var(--primary-color);
    background: #f1f5f9;
}

.premium-checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

/* SIDEBAR TAB FIX - ver sidebar_styles.css para as regras completas */

/* ========================================
   PORTFOLIO DASHBOARD ANIMATIONS
   ======================================== */
@keyframes slideDownPortfolio {
    from { transform: translate(-50%, -100%); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.portfolio-dash {
    animation: slideDownPortfolio 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

.portfolio-dash > div {
    transition: transform 0.2s;
}

.portfolio-dash > div:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .portfolio-dash {
        flex-direction: column;
        width: 90%;
        gap: 15px;
        top: 20px;
        padding: 20px;
    }
    .portfolio-dash > div {
        border-right: none !important;
        border-bottom: 1px solid #764ba211;
        padding-right: 0 !important;
        padding-bottom: 10px;
        width: 100%;
    }
}

/* ========================================
   GLOBAL ALERT BAR (MARQUEE)
   ======================================== */
.global-alert-bar {
    position: fixed;
    top: 70px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    background: rgba(15, 23, 42, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: 99px;
    padding: 6px 20px;
    color: #4ade80;
    font-size: 11px;
    font-weight: 800;
    width: auto;
    max-width: 90%;
    overflow: hidden;
    display: none;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.5);
    pointer-events: none;
}

.global-alert-bar.active {
    display: flex;
    animation: slideDownAlert 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

@keyframes slideDownAlert {
    from { transform: translate(-50%, -40px); opacity: 0; }
    to { transform: translate(-50%, 0); opacity: 1; }
}

.marquee-container {
    overflow: hidden;
    white-space: nowrap;
    width: 100%;
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: marquee 20s linear infinite;
}

@keyframes marquee {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

/* Animations for Premium UI */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse-blue {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(2, 132, 199, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 15px rgba(2, 132, 199, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(2, 132, 199, 0); }
}

