/* ============================================
   FORMS PREMIUM - Sistema Disciplinar Pantanal
   Criado: 08/12/2025 - Session 24

   Design System para formularios e interfaces de gestao
   Estetica: Glass Morphism + Clean Lines + Micro-interactions
============================================ */

/* ============================================
   CSS VARIABLES - FORMS
============================================ */
:root {
    /* Cores Base */
    --form-primary: #1D357F;
    --form-secondary: #00897B;
    --form-accent: #00BFA5;
    --form-success: #10B981;
    --form-danger: #EF4444;
    --form-warning: #F59E0B;

    /* Backgrounds */
    --form-bg-card: rgba(255, 255, 255, 0.95);
    --form-bg-input: #FAFBFC;
    --form-bg-hover: #F3F4F6;

    /* Borders */
    --form-border: #E5E7EB;
    --form-border-focus: #00897B;

    /* Shadows */
    --form-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --form-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --form-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --form-shadow-glow: 0 0 0 3px rgba(0, 137, 123, 0.15);

    /* Timing */
    --form-transition: cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --form-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --form-font-display: 'Space Grotesk', sans-serif;
}

/* ============================================
   PAGE HEADER PREMIUM
============================================ */
.page-header-premium {
    background: linear-gradient(135deg, var(--form-primary) 0%, var(--form-secondary) 100%);
    border-radius: 20px;
    padding: 32px 36px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--form-shadow-lg), 0 0 40px rgba(0, 137, 123, 0.15);
}

.page-header-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.page-header-premium::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 60%);
    pointer-events: none;
}

.page-header-premium .header-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 20px;
}

.page-header-premium .header-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.page-header-premium .header-icon svg {
    width: 32px;
    height: 32px;
    stroke: white;
}

.page-header-premium .header-text h1 {
    font-family: var(--form-font-display);
    font-size: 1.75rem;
    font-weight: 700;
    color: white;
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
}

.page-header-premium .header-text p {
    font-family: var(--form-font);
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

/* ============================================
   BREADCRUMB PREMIUM
============================================ */
.breadcrumb-premium {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 24px;
    font-family: var(--form-font);
    font-size: 0.875rem;
    padding: 12px 20px;
    background: var(--form-bg-card);
    border-radius: 12px;
    box-shadow: var(--form-shadow-sm);
    border: 1px solid var(--form-border);
}

.breadcrumb-premium a {
    color: var(--form-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s var(--form-transition);
    padding: 4px 8px;
    border-radius: 6px;
}

.breadcrumb-premium a:hover {
    background: var(--form-bg-hover);
    color: var(--form-secondary);
}

.breadcrumb-premium a svg {
    width: 16px;
    height: 16px;
}

.breadcrumb-premium .separator {
    color: #9CA3AF;
    font-weight: 500;
}

.breadcrumb-premium .current {
    color: #6B7280;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-premium .current svg {
    width: 16px;
    height: 16px;
}

/* ============================================
   FORM CONTAINER PREMIUM
============================================ */
.form-container-premium {
    background: var(--form-bg-card);
    border-radius: 20px;
    padding: 0;
    box-shadow: var(--form-shadow-lg);
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.form-container-premium .form-header {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    padding: 24px 32px;
    border-bottom: 1px solid var(--form-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-container-premium .form-header h2 {
    font-family: var(--form-font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.form-container-premium .form-header h2 svg {
    width: 24px;
    height: 24px;
    color: var(--form-secondary);
}

.form-container-premium .form-body {
    padding: 32px;
}

/* ============================================
   FORM SECTIONS
============================================ */
.form-section {
    margin-bottom: 40px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, var(--form-secondary), transparent) 1;
}

.section-header .section-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--form-secondary) 0%, var(--form-accent) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 137, 123, 0.25);
}

.section-header .section-icon svg {
    width: 20px;
    height: 20px;
    color: white;
}

.section-header h3 {
    font-family: var(--form-font-display);
    font-size: 1.1rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0;
}

/* ============================================
   FORM GRID
============================================ */
.form-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.form-grid-premium.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.form-grid-premium.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.form-grid-premium.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.form-group-premium {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group-premium.full-width {
    grid-column: 1 / -1;
}

.form-group-premium.half-width {
    grid-column: span 1;
}

/* ============================================
   FORM LABELS
============================================ */
.form-label-premium {
    font-family: var(--form-font);
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label-premium .required {
    color: var(--form-danger);
    font-weight: 700;
}

.form-label-premium .hint {
    font-weight: 400;
    color: #9CA3AF;
    font-size: 0.8rem;
    margin-left: auto;
}

/* ============================================
   FORM INPUTS
============================================ */
.form-input-premium,
.form-select-premium,
.form-textarea-premium {
    font-family: var(--form-font);
    font-size: 0.95rem;
    padding: 14px 16px;
    border: 2px solid var(--form-border);
    border-radius: 12px;
    background: var(--form-bg-input);
    color: #1F2937;
    transition: all 0.25s var(--form-transition);
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.form-input-premium::placeholder {
    color: #9CA3AF;
}

.form-input-premium:hover,
.form-select-premium:hover,
.form-textarea-premium:hover {
    border-color: #D1D5DB;
    background: white;
}

.form-input-premium:focus,
.form-select-premium:focus,
.form-textarea-premium:focus {
    border-color: var(--form-border-focus);
    background: white;
    box-shadow: var(--form-shadow-glow);
}

.form-select-premium {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 44px;
}

.form-textarea-premium {
    min-height: 120px;
    resize: vertical;
    line-height: 1.6;
}

/* Input with icon */
.input-with-icon {
    position: relative;
}

.input-with-icon .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #9CA3AF;
    pointer-events: none;
    transition: color 0.25s var(--form-transition);
}

.input-with-icon .form-input-premium {
    padding-left: 46px;
}

.input-with-icon:focus-within .input-icon {
    color: var(--form-secondary);
}

/* ============================================
   FOTO UPLOAD PREMIUM
============================================ */
.foto-upload-premium {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    padding: 24px;
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    border-radius: 16px;
    border: 2px dashed var(--form-border);
    transition: all 0.3s var(--form-transition);
}

.foto-upload-premium:hover {
    border-color: var(--form-secondary);
    background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 100%);
}

.foto-preview-premium {
    width: 140px;
    height: 180px;
    background: white;
    border-radius: 12px;
    border: 2px solid var(--form-border);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-shadow: var(--form-shadow-md);
    transition: all 0.3s var(--form-transition);
    flex-shrink: 0;
}

.foto-preview-premium img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.foto-preview-premium .placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #9CA3AF;
}

.foto-preview-premium .placeholder svg {
    width: 40px;
    height: 40px;
    opacity: 0.5;
}

.foto-preview-premium .placeholder span {
    font-size: 0.8rem;
    font-weight: 500;
}

.foto-input-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.foto-input-area .upload-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--form-primary) 0%, var(--form-secondary) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-family: var(--form-font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s var(--form-transition);
    box-shadow: 0 4px 12px rgba(29, 53, 127, 0.25);
}

.foto-input-area .upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 53, 127, 0.35);
}

.foto-input-area .upload-btn svg {
    width: 18px;
    height: 18px;
}

.foto-input-area .upload-hint {
    font-size: 0.8rem;
    color: #6B7280;
    line-height: 1.5;
}

/* ============================================
   BUTTONS PREMIUM
============================================ */
.form-actions-premium {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    padding-top: 32px;
    margin-top: 32px;
    border-top: 2px solid var(--form-border);
}

.btn-premium {
    font-family: var(--form-font);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s var(--form-transition);
    text-decoration: none;
}

.btn-premium svg {
    width: 20px;
    height: 20px;
}

.btn-premium-primary {
    background: linear-gradient(135deg, var(--form-secondary) 0%, var(--form-accent) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 137, 123, 0.35);
}

.btn-premium-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 137, 123, 0.45);
}

.btn-premium-success {
    background: linear-gradient(135deg, #10B981 0%, #34D399 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.35);
}

.btn-premium-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.45);
}

.btn-premium-danger {
    background: linear-gradient(135deg, #EF4444 0%, #F87171 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.35);
}

.btn-premium-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.45);
}

.btn-premium-secondary {
    background: #F3F4F6;
    color: #4B5563;
    border: 2px solid var(--form-border);
    box-shadow: none;
}

.btn-premium-secondary:hover {
    background: #E5E7EB;
    border-color: #D1D5DB;
}

.btn-premium-outline {
    background: transparent;
    color: var(--form-primary);
    border: 2px solid var(--form-primary);
}

.btn-premium-outline:hover {
    background: var(--form-primary);
    color: white;
}

/* ============================================
   MESSAGES PREMIUM
============================================ */
.message-premium {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--form-font);
    font-size: 0.9rem;
    animation: messageSlideIn 0.4s var(--form-transition);
}

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

.message-premium svg {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.message-premium-success {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    color: #065F46;
    border: 1px solid #6EE7B7;
}

.message-premium-error {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    color: #991B1B;
    border: 1px solid #FCA5A5;
}

.message-premium-warning {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    color: #92400E;
    border: 1px solid #FCD34D;
}

.message-premium-info {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    color: #1E40AF;
    border: 1px solid #93C5FD;
}

/* ============================================
   TABLE PREMIUM
============================================ */
.table-container-premium {
    background: var(--form-bg-card);
    border-radius: 20px;
    box-shadow: var(--form-shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.table-header-premium {
    background: linear-gradient(135deg, #F8FAFC 0%, #F1F5F9 100%);
    padding: 20px 28px;
    border-bottom: 1px solid var(--form-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.table-header-premium h2 {
    font-family: var(--form-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-header-premium h2 svg {
    width: 22px;
    height: 22px;
    color: var(--form-secondary);
}

.table-header-premium .table-actions {
    display: flex;
    gap: 10px;
}

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

.table-premium th,
.table-premium td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid var(--form-border);
    font-family: var(--form-font);
}

.table-premium th {
    background: #F9FAFB;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
}

.table-premium td {
    font-size: 0.9rem;
    color: #374151;
}

.table-premium tbody tr {
    transition: all 0.2s var(--form-transition);
}

.table-premium tbody tr:hover {
    background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 100%);
}

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

.table-premium .foto-mini {
    width: 44px;
    height: 58px;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: var(--form-shadow-sm);
}

.table-premium .foto-placeholder {
    width: 44px;
    height: 58px;
    background: linear-gradient(135deg, #E5E7EB 0%, #D1D5DB 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-premium .foto-placeholder svg {
    width: 20px;
    height: 20px;
    color: #9CA3AF;
}

.table-footer-premium {
    padding: 16px 28px;
    background: #F9FAFB;
    border-top: 1px solid var(--form-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--form-font);
    font-size: 0.875rem;
    color: #6B7280;
}

/* Status Badge */
.status-badge-premium {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-badge-premium.ativo {
    background: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    color: #065F46;
}

.status-badge-premium.inativo {
    background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%);
    color: #991B1B;
}

/* ============================================
   SEARCH/FILTER CONTAINER PREMIUM
============================================ */
.search-container-premium {
    background: var(--form-bg-card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: var(--form-shadow-md);
    border: 1px solid var(--form-border);
    margin-bottom: 24px;
}

.search-row-premium {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.search-group-premium {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-group-premium label {
    font-family: var(--form-font);
    font-size: 0.8rem;
    font-weight: 600;
    color: #4B5563;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-search-premium {
    background: linear-gradient(135deg, var(--form-primary) 0%, var(--form-secondary) 100%);
    color: white;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-family: var(--form-font);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s var(--form-transition);
    box-shadow: 0 4px 15px rgba(29, 53, 127, 0.25);
}

.btn-search-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 53, 127, 0.35);
}

.btn-search-premium svg {
    width: 18px;
    height: 18px;
}

/* ============================================
   UPLOAD AREA PREMIUM
============================================ */
.upload-area-premium {
    border: 2px dashed var(--form-border);
    border-radius: 16px;
    padding: 32px 24px;
    text-align: center;
    background: linear-gradient(135deg, #FAFBFC 0%, #F3F4F6 100%);
    transition: all 0.4s var(--form-transition);
    cursor: pointer;
}

.upload-area-premium:hover,
.upload-area-premium.dragover {
    border-color: var(--form-secondary);
    background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 100%);
    transform: scale(1.005);
}

.upload-icon-premium {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--form-secondary) 0%, var(--form-accent) 100%);
    border-radius: 14px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 137, 123, 0.25);
}

.upload-icon-premium svg {
    width: 28px;
    height: 28px;
    color: white;
}

.upload-text-premium {
    font-family: var(--form-font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 6px;
}

.upload-hint-premium {
    font-family: var(--form-font);
    font-size: 0.85rem;
    color: #6B7280;
}

.upload-input-premium {
    display: none;
}

/* Legacy classes (manter compatibilidade) */
.upload-area-premium .upload-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--form-secondary) 0%, var(--form-accent) 100%);
    border-radius: 14px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 137, 123, 0.25);
}

.upload-area-premium .upload-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

.upload-area-premium .upload-title {
    font-family: var(--form-font-display);
    font-size: 1.05rem;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 6px;
}

.upload-area-premium .upload-subtitle {
    font-family: var(--form-font);
    font-size: 0.85rem;
    color: #6B7280;
}

/* ============================================
   PROGRESS BAR PREMIUM
============================================ */
.progress-container-premium {
    margin-top: 24px;
}

.progress-bar-premium {
    width: 100%;
    height: 12px;
    background: #E5E7EB;
    border-radius: 6px;
    overflow: hidden;
}

.progress-fill-premium {
    height: 100%;
    background: linear-gradient(90deg, var(--form-secondary) 0%, var(--form-accent) 100%);
    border-radius: 6px;
    transition: width 0.4s var(--form-transition);
    position: relative;
}

.progress-fill-premium::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressShimmer 1.5s infinite;
}

@keyframes progressShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text-premium {
    font-family: var(--form-font);
    font-size: 0.9rem;
    color: #4B5563;
    text-align: center;
    margin-top: 12px;
}

/* ============================================
   LOADING STATE
============================================ */
.loading-premium {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    gap: 16px;
}

.loading-spinner-premium {
    width: 48px;
    height: 48px;
    border: 4px solid var(--form-border);
    border-top-color: var(--form-secondary);
    border-radius: 50%;
    animation: spinPremium 0.8s linear infinite;
}

@keyframes spinPremium {
    to { transform: rotate(360deg); }
}

.loading-premium span {
    font-family: var(--form-font);
    font-size: 0.95rem;
    color: #6B7280;
}

/* ============================================
   EMPTY STATE
============================================ */
.empty-state-premium {
    text-align: center;
    padding: 60px 40px;
}

.empty-state-premium .empty-icon {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    border-radius: 50%;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.empty-state-premium .empty-icon svg {
    width: 48px;
    height: 48px;
    color: #9CA3AF;
}

.empty-state-premium h3 {
    font-family: var(--form-font-display);
    font-size: 1.15rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 8px 0;
}

.empty-state-premium p {
    font-family: var(--form-font);
    font-size: 0.9rem;
    color: #6B7280;
    margin: 0;
}

/* ============================================
   DARK MODE
============================================ */
[data-theme="dark"] {
    --form-bg-card: rgba(30, 41, 59, 0.95);
    --form-bg-input: #1E293B;
    --form-bg-hover: #334155;
    --form-border: #374151;
    --form-border-focus: #00BFA5;
}

[data-theme="dark"] .form-container-premium,
[data-theme="dark"] .table-container-premium,
[data-theme="dark"] .search-container-premium {
    background: var(--form-bg-card);
    border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .form-container-premium .form-header,
[data-theme="dark"] .table-header-premium {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
}

[data-theme="dark"] .form-container-premium .form-header h2,
[data-theme="dark"] .table-header-premium h2,
[data-theme="dark"] .section-header h3 {
    color: #F1F5F9;
}

[data-theme="dark"] .form-label-premium {
    color: #E2E8F0;
}

[data-theme="dark"] .form-input-premium,
[data-theme="dark"] .form-select-premium,
[data-theme="dark"] .form-textarea-premium {
    background: var(--form-bg-input);
    border-color: var(--form-border);
    color: #F1F5F9;
}

[data-theme="dark"] .form-input-premium::placeholder {
    color: #6B7280;
}

[data-theme="dark"] .form-input-premium:focus,
[data-theme="dark"] .form-select-premium:focus,
[data-theme="dark"] .form-textarea-premium:focus {
    border-color: var(--form-accent);
    background: #0F172A;
    box-shadow: 0 0 0 3px rgba(0, 191, 165, 0.2);
}

/* Opções dos selects premium no dark mode */
[data-theme="dark"] .form-select-premium option {
    background-color: #1e293b !important;
    color: #f1f5f9 !important;
}

[data-theme="dark"] .form-select-premium option:hover,
[data-theme="dark"] .form-select-premium option:checked {
    background-color: #00897B !important;
    color: #ffffff !important;
}

[data-theme="dark"] .breadcrumb-premium {
    background: var(--form-bg-card);
    border-color: var(--form-border);
}

[data-theme="dark"] .breadcrumb-premium a {
    color: #60A5FA;
}

[data-theme="dark"] .breadcrumb-premium .current {
    color: #9CA3AF;
}

[data-theme="dark"] .table-premium th {
    background: #1E293B;
    color: #94A3B8;
}

[data-theme="dark"] .table-premium td {
    color: #E2E8F0;
}

[data-theme="dark"] .table-premium tbody tr:hover {
    background: linear-gradient(135deg, rgba(0, 191, 165, 0.1) 0%, rgba(0, 191, 165, 0.05) 100%);
}

[data-theme="dark"] .table-footer-premium {
    background: #1E293B;
}

[data-theme="dark"] .upload-area-premium {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border-color: #374151;
}

[data-theme="dark"] .upload-area-premium:hover,
[data-theme="dark"] .upload-area-premium.dragover {
    border-color: var(--form-accent);
    background: linear-gradient(135deg, rgba(0, 191, 165, 0.1) 0%, rgba(0, 191, 165, 0.05) 100%);
}

[data-theme="dark"] .upload-area-premium .upload-title {
    color: #F1F5F9;
}

[data-theme="dark"] .foto-upload-premium {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border-color: #374151;
}

[data-theme="dark"] .foto-upload-premium:hover {
    border-color: var(--form-accent);
}

[data-theme="dark"] .foto-preview-premium {
    background: #0F172A;
    border-color: #374151;
}

[data-theme="dark"] .btn-premium-secondary {
    background: #374151;
    color: #E2E8F0;
    border-color: #4B5563;
}

[data-theme="dark"] .btn-premium-secondary:hover {
    background: #4B5563;
}

/* ============================================
   RESPONSIVIDADE
============================================ */
@media (max-width: 992px) {
    .form-grid-premium.cols-2,
    .form-grid-premium.cols-3,
    .form-grid-premium.cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .page-header-premium {
        padding: 24px;
    }

    .page-header-premium .header-text h1 {
        font-size: 1.5rem;
    }

    .form-container-premium .form-body {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .form-grid-premium,
    .form-grid-premium.cols-2,
    .form-grid-premium.cols-3,
    .form-grid-premium.cols-4 {
        grid-template-columns: 1fr;
    }

    .page-header-premium .header-content {
        flex-direction: column;
        text-align: center;
    }

    .form-actions-premium {
        flex-direction: column;
    }

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

    .search-row-premium {
        flex-direction: column;
    }

    .search-group-premium {
        width: 100%;
    }

    .foto-upload-premium {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .table-header-premium {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 576px) {
    .page-header-premium {
        padding: 20px;
        border-radius: 16px;
    }

    .page-header-premium .header-icon {
        width: 52px;
        height: 52px;
    }

    .page-header-premium .header-text h1 {
        font-size: 1.25rem;
    }

    .form-container-premium .form-body {
        padding: 20px;
    }

    .btn-premium {
        padding: 12px 20px;
        font-size: 0.9rem;
    }
}

/* ============================================
   ANIMACOES DE ENTRADA
============================================ */
@keyframes formFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-container-premium,
.table-container-premium,
.search-container-premium,
.page-header-premium {
    animation: formFadeIn 0.5s var(--form-transition);
}

/* ============================================
   ACESSIBILIDADE
============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

.form-input-premium:focus-visible,
.form-select-premium:focus-visible,
.btn-premium:focus-visible {
    outline: 3px solid var(--form-accent);
    outline-offset: 2px;
}
