/* assets/css/formStyles.css - ORACLE MINIMALIST + HEADER COMPACTO + ÍCONOS + BOTÕES */

/* Importa fonte */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');

:root {
    --primary: #0d6efd;
    --primary-hover: #0b5ed7;
    --border: #e5e7eb;
    --input-bg: #f9fafb;
    --ring: #3b82f6;
    --foreground: #111827;
    --muted: #6b7280;
    --radius: 0.5rem;
    --shadow: 0 1px 3px 0 rgba(0,0,0,0.1), 0 1px 2px 0 rgba(0,0,0,0.06);
    --container-max: 1200px;
    --header-height: 48px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background: #f9fafb;
    color: var(--foreground);
    font-size: 0.8125rem;
    line-height: 1.5;
}

/* ============================================
   CONTAINER E CARD
   ============================================ */
.container {
    max-width: var(--container-max);
    margin: 1.5rem auto;
    padding: 0 1rem;
}

.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

/* ============================================
   HEADER ULTRA-COMPACTO
   ============================================ */
.card-header {
    height: var(--header-height);
    padding: 0;
    border-bottom: 1px solid var(--border);
    background: white;
    display: flex;
    align-items: center;
}

.header-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--primary);
    margin-right: 0.75rem;
}

.header-content {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0 1.25rem;
    gap: 0.75rem;
}

/* ============================================
   ÍCONES À ESQUERDA
   ============================================ */
.icon-gallery {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.icon-gallery i {
    font-size: 1rem;
    color: var(--primary);
    padding: 0.25rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.icon-gallery i:hover {
    background: #eff6ff;
    color: var(--primary-hover);
    transform: scale(1.1);
}

/* ============================================
   BOTÕES DO HEADER (ESPECÍFICOS)
   ============================================ */
.header-actions {
    margin-left: auto;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.header-content .btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
}

.header-content .btn-primary {
    background: var(--primary);
    color: white;
}

.header-content .btn-secondary {
    background: #6b7280;
    color: white;
}

.header-content .btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.header-content .btn-primary:hover {
    background: var(--primary-hover);
}

.header-content .btn-secondary:hover {
    background: #4b5563;
}

/* ============================================
   BOTÕES GLOBAIS (NOVOS!)
   ============================================ */

.btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #bb2d3b;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-success {
    background: #198754;
    color: white;
}

.btn-success:hover {
    background: #157347;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-warning {
    background: #ffc107;
    color: #111;
}

.btn-warning:hover {
    background: #e0a800;
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* ============================================
   CORPO DO FORM
   ============================================ */
.card-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.field label {
    font-weight: 500;
    font-size: 0.75rem;
    color: var(--foreground);
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper input,
.input-wrapper select,
.input-wrapper textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--input-bg);
    font-size: 0.8125rem;
    transition: all 0.15s ease;
}

.input-wrapper input:focus,
.input-wrapper select:focus,
.input-wrapper textarea:focus {
    outline: none;
    border-color: var(--ring);
    box-shadow: 0 0 0 2.5px rgba(59, 130, 246, 0.1);
}

/* Ícone em inputs */
.input-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--muted);
    font-size: 0.875rem;
    pointer-events: none;
    z-index: 1;
}

.input-with-icon {
    padding-left: 2.5rem;
}

.input-with-icon::placeholder {
    color: var(--muted);
}

/* Select */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.25em;
    padding-right: 2.25rem;
}

/* Checkboxes */
.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.checkbox-item,
.radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.checkbox-item input,
.radio-item input {
    width: 0.875rem;
    height: 0.875rem;
    border: 1.5px solid var(--border);
    border-radius: 0.25rem;
    accent-color: var(--primary);
}

/* File */
.file-wrapper {
    position: relative;
}

.file-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    background: var(--input-bg);
    color: var(--muted);
    font-size: 0.8125rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.file-label:hover {
    border-color: var(--primary);
    background: #eff6ff;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .container {
        margin: 1rem auto;
        padding: 0 0.75rem;
    }
    .card-body {
        padding: 1.25rem;
    }
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }
    .header-content {
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    .card-header {
        height: 44px;
    }
    .header-content {
        padding: 0 0.75rem;
    }
    .icon-gallery i {
        font-size: 0.9375rem;
    }
    .header-actions .btn {
        width: 32px;
        height: 32px;
        font-size: 0.875rem;
    }
    .input-wrapper input,
    .input-wrapper select,
    .input-wrapper textarea {
        padding: 0.4375rem 0.625rem;
        font-size: 0.75rem;
    }
    .field label {
        font-size: 0.6875rem;
    }
}
/* Toast Notification - Minimalista e Lateral */
.toast-notification {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    min-width: 320px;
    max-width: 420px;
    background: #1f2937;
    color: white;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    z-index: 9999;
    transform: translateX(120%);
    transition: transform 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-notification.success {
    background: linear-gradient(135deg, #166534, #22c55e);
}

.toast-notification.error {
    background: linear-gradient(135deg, #991b1b, #ef4444);
}

.toast-notification i {
    font-size: 1.375rem;
    opacity: 0.9;
}

.toast-close {
    margin-left: auto;
    cursor: pointer;
    font-size: 1.25rem;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.toast-close:hover {
    opacity: 1;
}

@media (max-width: 640px) {
    .toast-notification {
        left: 1rem;
        right: 1rem;
        min-width: auto;
        top: 1rem;
    }
}