/* admin.css - Premium BackOffice Design System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #6366f1;
    /* Indigo - More premium than standard blue */
    --primary-dark: #4f46e5;
    --sidebar-bg: #0f172a;
    --sidebar-item-active: rgba(99, 102, 241, 0.15);
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --title-color: #1e293b;
    --text-muted: #64748b;
    --sidebar-width: 260px;
    --radius-lg: 16px;
    --radius-md: 12px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background: var(--bg-main);
    color: var(--title-color);
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    padding: 2rem 1.25rem;
    display: flex;
    flex-direction: column;
    z-index: 1000;
}

.sidebar-brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.sidebar-brand i {
    color: var(--primary);
}

.nav-menu {
    flex-grow: 1;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 1rem;
    color: #94a3b8;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0.5rem;
}

.nav-item:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.nav-item.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.logout-container {
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Main Content Layout */
.main-content {
    margin-left: var(--sidebar-width);
    flex-grow: 1;
    padding: 2.5rem;
    width: calc(100% - var(--sidebar-width));
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2.5rem;
}

.page-header h1 {
    font-size: 1.875rem;
    font-weight: 800;
    color: var(--title-color);
}

/* Premium Card & Forms */
.premium-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 10px 15px -3px rgba(0, 0, 0, 0.03);
    overflow: hidden;
    margin-bottom: 2rem;
}

.section-head {
    padding: 1.25rem 2rem;
    background: #fdfdfd;
    border-bottom: 1px solid #f1f5f9;
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 2rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1.5rem;
}

.form-group {
    grid-column: span 6;
}

.form-group.full {
    grid-column: span 12;
}

.form-group.third {
    grid-column: span 4;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #475569;
    font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.95rem;
    transition: all 0.2s;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

/* Custom Select Styling */
select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25rem;
    appearance: none;
}

/* Custom Color Picker Legibility */
.form-group input[type="color"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    height: 3.5rem;
    padding: 0.4rem;
    background: #fff;
    cursor: pointer;
}

.form-group input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.form-group input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 8px;
}

.form-group input[type="color"]::-moz-color-swatch {
    border: none;
    border-radius: 8px;
}

.color-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.color-input-wrapper span {
    position: absolute;
    right: 1rem;
    font-family: monospace;
    font-weight: 600;
    color: var(--text-muted);
    pointer-events: none;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

/* Actions */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(99, 102, 241, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.btn-danger {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.btn-danger:hover {
    background: #fecaca;
    transform: translateY(-2px);
}

/* Badges */
.badge {
    padding: 0.35rem 0.75rem;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-warning {
    background: #fef3c7;
    color: #b45309;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 80px;
        padding: 1.5rem 0;
        align-items: center;
    }

    .sidebar-brand span,
    .nav-item span {
        display: none;
    }

    .main-content {
        margin-left: 80px;
        width: calc(100% - 80px);
    }

    .sidebar-brand {
        margin-bottom: 2rem;
    }
}

/* Modais */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--card-bg);
    padding: 0;
    border-radius: var(--radius-lg);
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 800;
}

.close {
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.close:hover {
    color: var(--title-color);
}

#form-percurso {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sortable-ghost {
    opacity: 0.4;
    background: var(--primary-light);
}