/* ============================================================
   Dashboard Custom Styles
   Complementa o style.css do template Fila.
   NÃO duplicar classes que já existem no Fila (style.css).
   ============================================================ */

/* Ajuste de tabela de listagem — colunas proporcionais ao conteúdo */
.default-table-area .table {
    table-layout: auto;
    width: 100%;
}

.default-table-area .table thead tr th,
.default-table-area .table tbody tr td {
    padding: 14px 16px;
}

/* Dashboard Stats Cards */
.border-end-custom {
    border-right: 1px solid #e5e7eb !important;
}

.chart-position {
    position: relative;
    min-height: 35px;
}

/* Material Symbols (não incluído no Fila) */
.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
}

/* Sidebar Menu */
.menu-icon {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    font-size: 20px !important;
}

.menu-inner {
    padding: 20px 0;
}

.menu-item {
    margin-bottom: 5px;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #64748b;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 0 15px;
}

.menu-link:hover,
.menu-link.active {
    background-color: #f1f5f9;
    color: #3b82f6;
}

.menu-toggle::after {
    content: 'keyboard_arrow_down' !important;
    font-family: 'Material Symbols Outlined' !important;
    position: static !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    border: none !important;
    margin-left: auto;
    font-size: 20px;
    transition: transform 0.3s ease;
    transform: none;
}

.menu-item.open > .menu-toggle::after {
    transform: rotate(180deg) !important;
}

.menu-sub {
    display: none;
    padding-left: 40px;
    margin-top: 5px;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

.menu-item.open > .menu-sub {
    display: block;
}

.menu-title {
    padding: 15px 20px 10px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Sidebar Layout */
.sidebar-area {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: #fff;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.main-content {
    margin-left: 280px;
    min-height: 100vh;
    padding: 20px;
    transition: all 0.3s ease;
}

@media (max-width: 1199px) {
    .sidebar-area {
        transform: translateX(-100%);
    }
    .sidebar-area.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
}

/* Header */
.header-area {
    padding: 20px;
    margin-bottom: 20px;
}

/* Notification badge (header) */
.count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Notification dropdown */
.notification-menu {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.2s ease;
}

.notification-menu:hover {
    background-color: #f8f9fa;
}

.notification-menu.unseen {
    background-color: rgba(59, 130, 246, 0.05);
}

.notification-menu:last-child {
    border-bottom: none;
}

/* Admin profile dropdown */
.admin-profile .dropdown-toggle::after {
    display: none;
}

.admin-link {
    padding: 10px 0;
}

.admin-item-link {
    padding: 8px 20px;
    display: flex;
    align-items: center;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
}

.admin-item-link:hover {
    background-color: #f1f5f9;
    color: #3b82f6;
}

/* Logo */
.logo {
    padding: 20px;
    border-bottom: 1px solid #f1f3f4;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-left: 10px;
}

/* Search form (header) */
.src-form {
    position: relative;
    width: 300px;
}

.src-form .form-control {
    padding-left: 45px;
}

.src-btn {
    left: 15px;
    color: #9ca3af;
}

/* Light/Dark mode toggle */
.light-dark button {
    background: transparent;
    border: none;
    padding: 8px;
    border-radius: 6px;
    color: #64748b;
    transition: all 0.2s ease;
}

.light-dark button:hover {
    background-color: #f1f5f9;
    color: #3b82f6;
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.waviy {
    position: relative;
}

.waviy span {
    display: inline-block;
    color: #3b82f6;
    font-size: 40px;
    font-weight: bold;
    animation: waviy 1s infinite;
    animation-delay: calc(.1s * var(--i));
}

@keyframes waviy {
    0%, 40%, 100% { transform: translateY(0) }
    20% { transform: translateY(-20px) }
}

/* Theme settings button */
.theme-settings-btn {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

/* Offcanvas customization */
.offcanvas {
    border-radius: 15px 0 0 15px;
}

.offcanvas-header {
    border-bottom: 1px solid #f1f3f4;
}

/* Toggle switches (theme settings) */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background-color: #cbd5e0;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    appearance: none;
    border: none;
    outline: none;
}

.toggle-switch:checked {
    background-color: #3b82f6;
}

.toggle-switch::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: white;
    top: 2px;
    left: 2px;
    transition: transform 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch:checked::before {
    transform: translateX(20px);
}

/* Footer */
.footer-area {
    padding: 20px;
    margin-top: 40px;
    border-top: 1px solid #f1f3f4;
}

/* Responsive */
@media (max-width: 768px) {
    .header-area .row > div {
        margin-bottom: 15px;
    }
}

@media (max-width: 575px) {
    .logo-text {
        font-size: 20px;
    }
    .src-form {
        width: 250px;
    }
}
