/* ============================================
   GESTÃO DE ESCOLA - CSS PRINCIPAL
   Estilo inspirado em iOS / Apple Design
   ============================================ */

/* ============================================
   RESET E BASE
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f5f5f7;
    color: #1d1d1f;
    line-height: 1.5;
    min-height: 100vh;
}

/* ============================================
   LAYOUT BASE - CONTAINER PRINCIPAL
   ============================================ */
.app-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-container.has-sidebar {
    flex-direction: row;
}

.app-container.has-sidebar .app-main-wrapper {
    flex: 1;
    margin-left: 260px;
}

/* ============================================
   HEADER
   ============================================ */
.app-header {
    background-color: #ffffff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 2rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============================================
   SIDEBAR
   ============================================ */
.app-sidebar {
    background-color: #ffffff;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0;
    min-width: 260px;
    max-width: 260px;
    box-shadow: 1px 0 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    overflow-y: auto;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 1.5rem 0;
}

.sidebar-brand {
    padding: 0 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.brand-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.25rem;
}

.brand-subtitle {
    font-size: 0.8125rem;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0 1rem;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #1d1d1f;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
}

.nav-link:hover {
    background-color: #f5f5f7;
    transform: translateX(4px);
}

.nav-item.active .nav-link {
    background-color: #007aff;
    color: #ffffff;
}

.nav-icon {
    font-size: 1.25rem;
    margin-right: 0.75rem;
    width: 24px;
    text-align: center;
}

.nav-text {
    font-weight: 500;
}

.sidebar-footer {
    padding: 1rem 1rem 0;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: auto;
}

.logout-link {
    color: #ff3b30;
}

.logout-link:hover {
    background-color: #ff3b30;
    color: #ffffff;
}

/* ============================================
   DROPDOWN MENU - SIDEBAR
   ============================================ */
.nav-item-dropdown {
    position: relative;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-arrow {
    font-size: 0.625rem;
    color: #86868b;
    transition: transform 0.2s ease;
    margin-left: auto;
    margin-right: 0.5rem;
}

.nav-item-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 0 0 8px 8px;
}

.nav-item-dropdown.active .dropdown-menu {
    max-height: 300px;
    padding: 0.5rem 0;
}

.nav-item-dropdown.has-active-child {
    background-color: rgba(0, 122, 255, 0.05);
}

.nav-item-dropdown.has-active-child .nav-link {
    color: #007aff;
}

.dropdown-item {
    margin: 0;
}

.dropdown-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem 0.625rem 3rem;
    color: #1d1d1f;
    text-decoration: none;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.dropdown-link:hover {
    background-color: rgba(0, 122, 255, 0.08);
    color: #007aff;
    border-left-color: #007aff;
}

.dropdown-item.active .dropdown-link {
    background-color: rgba(0, 122, 255, 0.12);
    color: #007aff;
    border-left-color: #007aff;
    font-weight: 500;
}

.dropdown-icon {
    font-size: 1rem;
    width: 1.25rem;
    text-align: center;
}

/* ============================================
   CONTENT (ÁREA PRINCIPAL)
   ============================================ */
.app-content {
    flex: 1;
    padding: 2rem;
    width: 100%;
    overflow-y: auto;
    background-color: #f5f5f7;
}

/* ============================================
   HEADER CONTENT
   ============================================ */
.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    flex: 1;
}

.header-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.25rem;
}

.header-subtitle {
    font-size: 0.875rem;
}

.header-right {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-name {
    font-weight: 500;
    color: #1d1d1f;
}

.user-badge {
    background-color: #007aff;
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* ============================================
   CARDS - ESTILO APPLE
   ============================================ */
.card {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 2rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* ============================================
   FORMULÁRIOS
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    font-family: inherit;
    color: #1d1d1f;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    transition: all 0.2s ease;
    outline: none;
}

.form-input:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.form-input::placeholder {
    color: #86868b;
}

.form-input[readonly] {
    background-color: #f5f5f7;
    cursor: not-allowed;
    opacity: 0.8;
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

.preco-value {
    color: #34c759;
    font-size: 1.125rem;
}

.action-btn-link {
    background-color: rgba(0, 199, 190, 0.1);
    color: #00c7be;
}

.action-btn-link:hover {
    background-color: #00c7be;
    color: #ffffff;
    transform: scale(1.1);
}

.action-btn-maintenance {
    background-color: rgba(255, 149, 0, 0.1);
    color: #ff9500;
}

.action-btn-maintenance:hover {
    background-color: #ff9500;
    color: #ffffff;
    transform: scale(1.1);
}

/* ============================================
   MODAL
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

.modal.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #86868b;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background-color: #f5f5f7;
    color: #1d1d1f;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 10000;
    min-width: 300px;
    max-width: 500px;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.toast-success {
    background-color: #34c759;
    color: #ffffff;
}

.toast-error {
    background-color: #ff3b30;
    color: #ffffff;
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toast-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.toast-message {
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Responsividade para Toast */
@media (max-width: 768px) {
    .toast {
        right: 1rem;
        left: 1rem;
        min-width: auto;
        max-width: none;
        transform: translateY(-100px);
    }
    
    .toast.show {
        transform: translateY(0);
    }
}

.form-input-error {
    border-color: #ff3b30;
}

.form-input-error:focus {
    border-color: #ff3b30;
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.1);
}

.form-error {
    display: block;
    font-size: 0.8125rem;
    color: #ff3b30;
    margin-top: 0.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
}

.alert-error {
    background-color: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.2);
    color: #ff3b30;
}

.alert-error p {
    margin: 0;
    font-size: 0.875rem;
}

.alert-success {
    background-color: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.2);
    color: #34c759;
}

.alert-success p {
    margin: 0;
    font-size: 0.875rem;
}

.alert-error ul {
    margin: 0;
    padding-left: 1.5rem;
}

.alert-error li {
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.alert-error li:last-child {
    margin-bottom: 0;
}

/* ============================================
   BOTÕES
   ============================================ */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}

.btn-primary {
    background-color: #007aff;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #0051d5;
    transform: scale(1.02);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.3);
}

/* ============================================
   TIPOGRAFIA
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: #1d1d1f;
    line-height: 1.2;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

.text-muted {
    color: #86868b;
    font-size: 0.875rem;
}

/* ============================================
   UTILITÁRIOS
   ============================================ */
.text-center {
    text-align: center;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

/* ============================================
   RESPONSIVIDADE
   ============================================ */
/* ============================================
   DASHBOARD - CARDS DE ESTATÍSTICAS
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    gap: 1.25rem;
}

.stat-card:hover {
    transform: translateY(-4px);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    flex-shrink: 0;
}

.stat-icon-primary {
    background-color: rgba(0, 122, 255, 0.1);
}

.stat-icon-success {
    background-color: rgba(52, 199, 89, 0.1);
}

.stat-icon-warning {
    background-color: rgba(255, 149, 0, 0.1);
}

.stat-icon-info {
    background-color: rgba(0, 199, 190, 0.1);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: #86868b;
    margin-bottom: 0.5rem;
}

.stat-change {
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

.stat-change.positive {
    color: #34c759;
}

.stat-change.negative {
    color: #ff3b30;
}

.stat-change.neutral {
    color: #86868b;
}

/* ============================================
   DASHBOARD - GRID PRINCIPAL
   ============================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.dashboard-card {
    padding: 0;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.25rem;
}

.card-subtitle {
    font-size: 0.8125rem;
}

.card-body {
    padding: 1.5rem;
}

/* ============================================
   GRÁFICOS PLACEHOLDER
   ============================================ */
.chart-placeholder {
    padding: 1rem 0;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    height: 200px;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(to top, #007aff, #5ac8fa);
    border-radius: 4px 4px 0 0;
    min-height: 20px;
    transition: all 0.3s ease;
}

.chart-bar:hover {
    opacity: 0.8;
    transform: scaleY(1.05);
}

.chart-labels {
    display: flex;
    justify-content: space-around;
    font-size: 0.75rem;
    color: #86868b;
    text-transform: uppercase;
    font-weight: 500;
}

/* ============================================
   TABELAS
   ============================================ */
.table-container {
    overflow-x: auto;
}

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

.data-table thead {
    background-color: #f5f5f7;
}

.data-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background-color 0.2s ease;
}

.data-table tbody tr:hover {
    background-color: #f5f5f7;
}

.data-table td {
    padding: 1rem;
    font-size: 0.9375rem;
    color: #1d1d1f;
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background-color: rgba(52, 199, 89, 0.1);
    color: #34c759;
}

.badge-warning {
    background-color: rgba(255, 149, 0, 0.1);
    color: #ff9500;
}

.badge-danger {
    background-color: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
}

.badge-info {
    background-color: rgba(0, 122, 255, 0.1);
    color: #007aff;
}

/* ============================================
   BADGES DE MENSAGENS (ELEGANTES)
   ============================================ */
.badges-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.badges-container .badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 500;
    animation: badgeSlideIn 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: relative;
    text-transform: none;
    letter-spacing: normal;
}

.badges-container .badge-error {
    background: linear-gradient(135deg, rgba(255, 59, 48, 0.1) 0%, rgba(255, 59, 48, 0.05) 100%);
    border: 1px solid rgba(255, 59, 48, 0.2);
    color: #ff3b30;
}

.badges-container .badge-success {
    background: linear-gradient(135deg, rgba(52, 199, 89, 0.1) 0%, rgba(52, 199, 89, 0.05) 100%);
    border: 1px solid rgba(52, 199, 89, 0.2);
    color: #34c759;
}

.badges-container .badge-info {
    background: linear-gradient(135deg, rgba(0, 122, 255, 0.1) 0%, rgba(0, 122, 255, 0.05) 100%);
    border: 1px solid rgba(0, 122, 255, 0.2);
    color: #007aff;
}

.badges-container .badge-warning {
    background: linear-gradient(135deg, rgba(255, 149, 0, 0.1) 0%, rgba(255, 149, 0, 0.05) 100%);
    border: 1px solid rgba(255, 149, 0, 0.2);
    color: #ff9500;
}

.badge-icon {
    font-size: 1.125rem;
    flex-shrink: 0;
}

.badge-text {
    flex: 1;
    line-height: 1.4;
}

.badge-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: inherit;
    opacity: 0.6;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    line-height: 1;
}

.badge-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}

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

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

/* ============================================
   AÇÕES RÁPIDAS
   ============================================ */
.quick-actions {
    padding: 0;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: #f5f5f7;
    border-radius: 10px;
    text-decoration: none;
    color: #1d1d1f;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.action-item:hover {
    background-color: #ffffff;
    border-color: #007aff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15);
}

.action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: #f5f5f7;
    border-radius: 10px;
    text-decoration: none;
    color: #1d1d1f;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.action-card:hover {
    background-color: #ffffff;
    border-color: #007aff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15);
}

.action-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.action-text {
    font-size: 0.875rem;
    font-weight: 500;
    text-align: center;
}

@media (max-width: 768px) {
    .app-container.has-sidebar {
        flex-direction: column;
    }
    
    .app-container.has-sidebar .app-main-wrapper {
        margin-left: 0;
    }
    
    .app-sidebar {
        min-width: 100%;
        max-width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }
    
    .sidebar-content {
        height: auto;
    }
    
    .app-content {
        padding: 1.5rem;
    }
    
    .card {
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .app-header {
        padding: 1rem;
    }
    
    .app-content {
        padding: 1rem;
    }
    
    .card {
        padding: 1.25rem;
        border-radius: 10px;
    }
    
    .btn {
        width: 100%;
        padding: 1rem;
    }
}

/* ============================================
   TELA DE LOGIN - CENTRALIZAÇÃO
   ============================================ */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
    background-color: #f5f5f7;
}

.login-card {
    width: 100%;
    max-width: 420px;
    padding: 3rem 2.5rem;
}

.login-card:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.login-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.login-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.login-subtitle {
    font-size: 0.9375rem;
    color: #86868b;
}

.login-form {
    width: 100%;
}

.btn-block {
    width: 100%;
    margin-top: 0.5rem;
}

/* Responsividade para Login */
@media (max-width: 480px) {
    .login-container {
        padding: 1rem;
    }
    
    .login-card {
        padding: 2rem 1.5rem;
        max-width: 100%;
    }
    
    .login-title {
        font-size: 1.75rem;
    }
}

/* ============================================
   PÁGINAS - BARRA DE AÇÕES
   ============================================ */
.page-actions {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.5rem;
}

.actions-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    font-size: 1.125rem;
    color: #86868b;
}

.search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    font-size: 0.9375rem;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 10px;
    background-color: #ffffff;
    transition: all 0.2s ease;
    outline: none;
}

.search-input:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.btn-icon {
    margin-right: 0.5rem;
}

/* ============================================
   LISTAGEM - TABELA MELHORADA
   ============================================ */
.escola-name strong {
    font-weight: 600;
    color: #1d1d1f;
}

.location-info {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.9375rem;
}

.location-separator {
    color: #86868b;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.contact-icon {
    font-size: 0.875rem;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.125rem;
}

.action-btn-view {
    background-color: rgba(0, 122, 255, 0.1);
    color: #007aff;
}

.action-btn-view:hover {
    background-color: #007aff;
    color: #ffffff;
    transform: scale(1.1);
}

.action-btn-edit {
    background-color: rgba(255, 149, 0, 0.1);
    color: #ff9500;
}

.action-btn-edit:hover {
    background-color: #ff9500;
    color: #ffffff;
    transform: scale(1.1);
}

.action-btn-delete {
    background-color: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
}

.action-btn-delete:hover {
    background-color: #ff3b30;
    color: #ffffff;
    transform: scale(1.1);
}

.action-btn-success {
    background-color: rgba(52, 199, 89, 0.1);
    color: #34c759;
}

.action-btn-success:hover {
    background-color: #34c759;
    color: #ffffff;
    transform: scale(1.1);
}

/* ============================================
   ESTADO VAZIO
   ============================================ */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.5;
}

.empty-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.5rem;
}

.empty-text {
    font-size: 1rem;
    margin-bottom: 2rem;
}

/* ============================================
   FORMULÁRIOS - SEÇÕES
   ============================================ */
.escola-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-section {
    padding: 0;
    overflow: hidden;
}

.section-header {
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background-color: #f5f5f7;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 0.25rem;
}

.section-subtitle {
    font-size: 0.8125rem;
}

.section-body {
    padding: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.form-col {
    display: flex;
    flex-direction: column;
}

.form-col-full {
    grid-column: 1 / -1;
}

.form-hint {
    display: block;
    font-size: 0.75rem;
    color: #86868b;
    margin-top: 0.25rem;
}

.required {
    color: #ff3b30;
    margin-left: 0.25rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 0;
}

.btn-secondary {
    background-color: #f5f5f7;
    color: #1d1d1f;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.btn-secondary:hover {
    background-color: #e5e5e7;
    transform: scale(1.02);
}

.btn-success {
    background-color: #34c759;
    color: #ffffff;
}

.btn-success:hover {
    background-color: #2da84a;
    transform: scale(1.02);
}

.btn-success:active {
    transform: scale(0.98);
}

.btn-success:focus {
    box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.3);
}

.btn-danger {
    background-color: #ff3b30;
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #d70015;
    transform: scale(1.02);
}

.btn-danger:active {
    transform: scale(0.98);
}

.btn-danger:focus {
    box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.3);
}

.btn-info {
    background-color: #007aff;
    color: #ffffff;
}

.btn-info:hover {
    background-color: #0051d5;
    transform: scale(1.02);
}

.btn-info:active {
    transform: scale(0.98);
}

.btn-info:focus {
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.3);
}

/* ============================================
   SWITCH (TOGGLE) - ESTILO iOS
   ============================================ */
.switch {
    position: relative;
    display: inline-block;
    width: 51px;
    height: 31px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e5e7;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 27px;
    width: 27px;
    left: 2px;
    bottom: 2px;
    background-color: #ffffff;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

input:checked + .slider {
    background-color: #34c759;
}

input:checked + .slider:before {
    transform: translateX(20px);
}

input:focus + .slider {
    box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.2);
}

.switch-small {
    width: 44px;
    height: 26px;
}

.switch-small .slider:before {
    height: 22px;
    width: 22px;
}

.switch-small input:checked + .slider:before {
    transform: translateX(18px);
}

.switch-label {
    margin-left: 0.5rem;
    font-size: 0.875rem;
    color: #1d1d1f;
    cursor: pointer;
}

/* ============================================
   HORÁRIOS DE FUNCIONAMENTO
   ============================================ */
.horario-dia-card {
    background-color: #f5f5f7;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
}

.horario-dia-card:last-child {
    margin-bottom: 0;
}

.horario-dia-card:hover {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.horario-dia-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.horario-dia-info {
    flex: 1;
}

.horario-dia-nome {
    font-size: 1rem;
    font-weight: 600;
    color: #1d1d1f;
    margin: 0;
}

.horario-dia-body {
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.horario-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.horario-row:last-child {
    margin-bottom: 0;
}

.horario-group {
    display: flex;
    flex-direction: column;
}

.horario-group-full {
    grid-column: 1 / -1;
}

.horario-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #86868b;
    margin-bottom: 0.5rem;
}

.horario-input {
    padding: 0.75rem;
    font-size: 0.9375rem;
}

.horario-textarea {
    padding: 0.75rem;
    font-size: 0.9375rem;
    resize: vertical;
    min-height: 60px;
}

/* ============================================
   FERIADOS
   ============================================ */
.feriado-form-card {
    background-color: #f5f5f7;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.feriado-form-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1d1d1f;
    margin-bottom: 1rem;
}

.feriado-form-inline {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feriado-form-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr auto auto;
    gap: 1rem;
    align-items: end;
}

.feriado-form-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feriados-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feriado-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.feriado-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.feriado-info {
    flex: 1;
}

.feriado-nome {
    font-size: 0.9375rem;
    font-weight: 500;
    color: #1d1d1f;
    margin-bottom: 0.25rem;
}

.feriado-data {
    font-size: 0.8125rem;
    color: #86868b;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feriado-badge {
    background-color: rgba(0, 122, 255, 0.1);
    color: #007aff;
    padding: 0.125rem 0.5rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
}

.feriado-observacoes {
    font-size: 0.8125rem;
    color: #86868b;
    margin-top: 0.25rem;
    font-style: italic;
}

.btn-icon-only {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
    color: #86868b;
    font-size: 1.125rem;
}

.btn-icon-only:hover {
    background-color: #f5f5f7;
    color: #ff3b30;
    transform: scale(1.1);
}

.btn-small {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
}

.empty-state-small {
    text-align: center;
    padding: 2rem;
}

.empty-state-small p {
    margin: 0;
}

@media (max-width: 768px) {
    .horario-row {
        grid-template-columns: 1fr;
    }
    
    .feriado-form-row {
        grid-template-columns: 1fr;
    }
    
    .feriado-form-group {
        width: 100%;
    }
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* ============================================
   DETALHES - VIEW SHOW
   ============================================ */
.escola-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.detail-section {
    padding: 0;
    overflow: hidden;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.detail-value {
    font-size: 1rem;
    color: #1d1d1f;
    margin: 0;
    word-break: break-word;
}

/* Responsividade para Formulários */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .actions-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: 100%;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .form-actions .btn {
        width: 100%;
    }
    
    .detail-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   STEPS INDICATOR (Formulário em Etapas)
   ============================================ */
.steps-indicator {
    margin-bottom: 2rem;
    padding: 1.5rem;
}

.steps-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.steps-container::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #d2d2d7;
    z-index: 0;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    position: relative;
    z-index: 1;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    right: -50%;
    height: 2px;
    background-color: #d2d2d7;
    z-index: -1;
    transition: background-color 0.3s ease;
}

.step-item.active::after,
.step-item.active ~ .step-item::after {
    background-color: #007aff;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid #d2d2d7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
    color: #86868b;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.step-item.active .step-number {
    background-color: #007aff;
    border-color: #007aff;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.step-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #86868b;
    text-align: center;
    transition: color 0.3s ease;
}

.step-item.active .step-label {
    color: #007aff;
    font-weight: 600;
}

.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.steps-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

.steps-actions .btn {
    min-width: 140px;
}

@media (max-width: 768px) {
    .steps-container {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .step-line {
        display: none;
    }
    
    .step-item {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        gap: 1rem;
    }
    
    .step-label {
        text-align: left;
    }
    
    .steps-actions {
        flex-direction: column-reverse;
    }
    
    .steps-actions .btn {
        width: 100%;
    }
}

/* ============================================
   CHECKBOXES E RADIO BUTTONS
   ============================================ */
.form-checkbox {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid #d2d2d7;
    background-color: #ffffff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    position: relative;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.form-checkbox:hover {
    border-color: #007aff;
}

.form-checkbox:checked {
    background-color: #007aff;
    border-color: #007aff;
}

.form-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffffff;
    font-size: 14px;
    font-weight: bold;
}

.form-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

