@tailwind base;
@tailwind components;
@tailwind typography;
@tailwind utilities;

/* Variáveis CSS */
:root {
    --sidebar-width: 250px;
    --sidebar-bg: #080A16;
    --sidebar-color: #fff;
    --content-bg: #f4f4f4;
    --header-height: 60px;
    --toggle-button-size: 40px;
    --transition-speed: 0.3s;
}

body::-webkit-scrollbar {
  width: 12px;               /* width of the entire scrollbar */
}

body::-webkit-scrollbar-track {
  background: var(--sidebar-bg);        /* color of the tracking area */
}

body::-webkit-scrollbar-thumb {
  background-image: linear-gradient(0deg, #026EB9, #1FA3DA);
  /* color of the scroll thumb */
  border-radius: 20px;       /* roundness of the scroll thumb */
  border: 3px solid #000000;  /* creates padding around scroll thumb */
}

.card-global{
    transition: background-color 0.2s;
    border: 0.5px solid;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.02);
    transition: all 0.4 linear;
    border-color: rgb(55 65 81 / 1);
}

.modal-content{
   background-color: var(--sidebar-bg) !important;
}

/* Estilos Gerais */
body {
    margin: 0;
    overflow-x: hidden;
    background-color: var(--sidebar-bg, #fff);
}

body.sidebar-open {
    overflow: hidden;
}

main{
    margin-left: 280px !important;
}

input{
    outline: 0 !important;
}

button[disabled] {
    background-color: rgba(37, 99, 235, 0.1) !important;
    color: #2563eb !important;
}

@media (max-width: 767px){
    main{
    margin-left: 0px !important;
    padding-top: 50px;
}
}


/* Header Mobile */
.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--sidebar-bg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    z-index: 1000;
}

.mobile-toggle{
    color: #026EB9 !important;
}

.mobile-header .logo {
    height: 40px;
    display: flex;
    align-items: center;
}

.mobile-header .logo img {
    height: 100%;
    width: 100px;
}

/* Mobile Toggle Button */
.mobile-toggle {
    width: var(--toggle-button-size);
    height: var(--toggle-button-size);
    background-color: transparent;
    border: none;
    color: var(--sidebar-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: color var(--transition-speed);
}

.mobile-toggle:hover {
    color: #666;
}

.mobile-toggle i {
    font-size: 28px;
}

/* Dashboard Container */
.dashboard-container {
    display: flex;
    position: relative;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-color);
    position: fixed;
    height: 100vh;
    transition: transform var(--transition-speed) ease;
    z-index: 1001;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.sidebar-header {
    padding: 0px 20px 20px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    justify-content: center;
}

.sidebar .nav-link {
    color: var(--sidebar-color);
    padding: 15px 20px;
    transition: background-color var(--transition-speed);
    display: flex;
    align-items: center;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: rgba(40, 57, 88, 0.2);
    backdrop-filter: blur(10px);
    text-decoration: none;
}

/* side user */
.sidebar-user{
    padding: 20px;
}

 .user-info {
            display: flex;
            align-items: center;
        }
        .profile-picture {
            max-width: 30px;
            height: 30px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 15px;
            border: 2px solid #ccc;
        }
        .user-name {
            font-size: 1em;
            color: var(--sidebar-color);
        }

/* Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-speed), visibility var(--transition-speed);
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

header.mobile-header.d-md-none {
    display: flex
;
    justify-content: space-between;
    padding: 20px 20px;
}

/* Conteúdo Principal */
.content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 20px;
    background-color: var(--content-bg);
    min-height: 100vh;
    transition: margin-left var(--transition-speed);
}

/* Login */
.login{
    background: url("assets/img/bg-login.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-left: -280px;
}

@media (max-width: 767px){
    main .login{
    margin-left: 0px;
    margin-top: -50px;
    padding: 0px 20px;
}
}

.login-container{
    background: white;
    border-radius: 10px;
    padding: 40px;
    width: 100%;
    max-width: 600px;
}

.login .logo img{
    width: 180px;
}

.login label{
    font-size: 1.15em;
}

.login input{
    font-size: 15px;
    color: rgba(255,255,255,0.8);
}

.login .form-control{
    font-weight: 300;
    font-size: 1.15em !important;
}

.login .btn{
    background: linear-gradient(-45deg, #026EB9, #1FA2DA);
    font-size: 1.05em;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--sidebar-color);
    border-radius: 8px 8px 8px 8px;
    padding: 16px 24px 16px 24px;
    
    background-size: 800% 400% !important;
    transition: all .5s;
    animation: gradient 10s infinite cubic-bezier(.62, .28, .23, .99) both !important;
}

.login .btn:hover{
    background-image: linear-gradient(to right, #004778 0%, #0E83B5 100%);
    transition: .5s ease;
    box-shadow: 0 0 5em 0.0001em rgb(31, 162, 218, 0.8), 0 0 2em 0.2em rgba(15, 199, 84, 0.1), inset 0 0 .5em .5em rgb(31, 162, 218, 0.8);
}

@keyframes gradient {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Registro de Usuários */
.filters {
            margin-bottom: 20px;
            padding: 15px;
            background-color: #f8f9fa;
            border-radius: 5px;
        }
        .filters input[type="text"] {
            padding: 8px;
            width: 200px;
            margin-right: 10px;
        }
        .filters button {
            padding: 8px 15px;
            background-color: #007bff;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        .filters button:hover {
            background-color: #0056b3;
        }
        .status-badge {
            padding: 6px 12px;
            border-radius: 15px;
            font-size: 14px;
        }
        .online {
            background-color: #dff0d8;
            color: #3c763d;
        }
        .offline {
            background-color: #f2dede;
            color: #a94442;
        }
        .pagination {
            margin-top: 20px;
            text-align: center;
        }
        .pagination a, .pagination span {
            display: inline-block;
            padding: 8px 12px;
            margin: 0 4px;
            border: 1px solid #ddd;
            border-radius: 4px;
            text-decoration: none;
            color: #007bff;
        }
        .pagination .active {
            background-color: #007bff;
            color: white;
            border-color: #007bff;
        }
        .pagination a:hover {
            background-color: #f5f5f5;
        }
        
         .delete-btn {
            background-color: #dc3545;
            color: white;
            padding: 8px 15px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            margin-bottom: 10px;
        }
        .delete-btn:hover {
            background-color: #c82333;
        }
        .delete-btn:disabled {
            background-color: #6c757d;
            cursor: not-allowed;
        }
        .checkbox-column {
            width: 30px;
            text-align: center;
        }
        #selectAll {
            margin: 0;
        }
        .actions-bar {
            margin: 20px 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .selected-count {
            color: #6c757d;
        }
                .status-badge {
            padding: 6px 12px;
            border-radius: 15px;
            font-size: 14px;
        }
        .online {
            background-color: #d1e7dd;
            color: #0f5132;
        }
        .offline {
            background-color: #f8d7da;
            color: #842029;
        }
        .form-check-input {
            cursor: pointer;
        }

/* Responsividade */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        top: var(--header-height);
        height: calc(100vh - var(--header-height));
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
        padding-top: calc(var(--header-height) + 20px);
    }
}


/* sidebar */
.sidebar {
            width: 280px;
            height: 100vh;
            background-color: var(--sidebar-bg, #fff);
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            position: fixed;
            left: 0;
            top: 0;
            padding: 0.8rem 0.6rem 0.4rem 0.6rem;
            font-family: 'Inter', sans-serif;
        }

        .sidebar-menu {
            flex-grow: 1;
        }

        .logo {
            padding: 0.5rem 1rem;

        }

        .logo img {
            height: 2.5rem;
            width: auto;
        }

        .nav-item {
            margin-bottom: 0.25rem;
        }

        .nav-link {
            display: flex;
            align-items: center;
            padding: 0.75rem 1rem !important;
            color: #64748b;
            text-decoration: none;
            border-radius: 0.5rem;
            transition: all 0.7s;
            position: relative;
            font-weight: 200;
            letter-spacing: 0.2px;
        }

        .nav-link svg {
            margin-right: 0.75rem;
            width: 20px;
            height: 20px;
            transition: all 0.2s ease;
        }
        
        .nav-link .remix-icon svg{
            width: 22px;
            height: 22px;
        }

        /* Configuração inicial dos SVGs */
        .nav-link .icon-outline {
            display: block;
        }

        .nav-link .icon-filled {
            display: none;
        }

        /* Hover state */
        .nav-link:hover {
            color: #2563eb;
            background-color: #fafafa;
        }

        .nav-link:hover .icon-outline {
            display: none;
        }

        .nav-link:hover .icon-filled {
            display: block;
            color: #2563eb;
        }
        
        .nav-link .icon-outline, .nav-link .icon-filled{
            margin-right: 10px;
        }

        /* Active state */
        .nav-link.active, .nav-link:hover {
            color: #2563eb;
            font-weight: 500;
            background-color: #f8faff;
        }

        .nav-link.active::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 3px;
            height: 16px;
            background-color: #2563eb;
            border-radius: 0 3px 3px 0;
        }

        .nav-link.active .icon-outline {
            display: none;
        }

        .nav-link.active .icon-filled {
            display: block;
            color: #2563eb;
        }
        
        /* créditos */
.nav-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

.credits-link {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 0.75rem 1rem;
    transition: background-color 0.2s;
        border: 0.5px solid ;
    border-radius: 10px;
    backdrop-filter: blur(10px);
    background-color: rgba(255,255,255,0.02);
    transition: all 0.4 linear;
    margin-bottom: 26px;
    border-color: rgb(55 65 81 / 1);
}

.credits-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.credits-header {
    padding: 0.25rem;
}

.credits-info {
    width: 100%;
}

.monthly-credits {
    font-weight: 200;
    margin-bottom: 0.5rem;
    color: var(--sidebar-color);
    font-size: 0.875rem;
}

.progress-section {
    width: 100%;
}

/* Estilização específica da barra de progresso */
.progress-container {
    background-color: #e2e8f0;
    border-radius: 0.375rem;
    height: 20px; /* Altura fixa em pixels */
    overflow: hidden;
    position: relative;
    margin-bottom: 0.5rem;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
    width: 100%; /* Garante largura total */
    display: block; /* Garante que o elemento seja exibido como bloco */
}

.progress-bar {
    background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
    height: 100%;
    min-width: 5px; /* Largura mínima para garantir visibilidade */
    transition: width 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.progress-text {
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
    padding: 0 0.25rem;
    position: absolute;
    width: 100%;
    text-align: center;
}

.credits-summary {
    font-size: 0.75rem;
    color: #64748b;
    text-align: right;
    margin-top: 0.25rem;
    display: block; /* Garante que seja exibido como bloco */
}

/* Ajustes responsivos */
@media (max-width: 768px) {
    .credits-link {
        padding: 0.5rem 0.75rem;
    }
    
    .progress-container {
        height: 16px;
    }
    
    .progress-text {
        font-size: 0.65rem;
    }
    
    .credits-summary {
        font-size: 0.7rem;
    }
}

.modal-content{
   background-color: var(--sidebar-bg) !important;
}

/* Login */
.login-card {
            transition: all 0.3s ease;
            border: 0.5px solid rgb(55 65 81 / 1);
            background-color: rgba(31, 41, 55, 0.5);
            backdrop-filter: blur(10px);
            width: 100%;
            max-width: 600px;
            margin: 0px 20px;
        }
        
        @media (max-width: 767px){
            .login-card{
                padding: 50px 20px !important;
            }
        }

        .form-input {
            background-color: rgba(31, 41, 55, 0.5);
            border: 0.5px solid rgb(55 65 81 / 1);
            color: #e5e7eb;
            transition: all 0.3s ease;
        }

        .form-input:focus {
            border-color: #2563eb;
            box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
        }

        .login-button {
            transition: all 0.3s ease;
            background-color: rgba(37, 99, 235, 0.1);
            color: #2563eb;
        }

        .login-button:hover {
            background-color: #2563eb;
            color: white;
        }

/* Admin agents */
.agent-card {
    transition: all 0.3s ease;
    border: 0.5px solid rgba(55, 65, 81, 0.5) !important;
    background-color: rgba(40, 57, 88, 0.1);
    backdrop-filter: blur(10px);
}

.agent-card:hover {
    transition: all 0.7s ease !important;
    transform: translateY(-4px);
    border-color: rgba(37, 99, 235, 0.2);
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.1);
}

.agent-icon {
    transition: all 0.7s ease;
    color: white;
    font-size: 1.8rem !important;
}

.agent-icon-container{
    background: rgba(37, 99, 235, 0.1) !important;
    border-radius: 0px 0px 20px 20px;
}

.action-button {
    transition: all 0.3s ease;
    background-color: rgba(37, 99, 235, 0.1);
    color: #2563eb;
}

.action-button:hover,  .agent-card:hover .agent-icon-container{
    background-color: #2563eb !important;
    color: white;
}

.remove-button {
    transition: all 0.3s ease;
    background-color: rgba(220, 38, 38, 0.1);
    color: #dc2626;
}

.remove-button:hover {
    background-color: #dc2626;
    color: white;
}

.form-select {
    background-color: rgba(31, 41, 55, 0.5);
    border: 0.5px solid rgb(55 65 81 / 1);
    color: #e5e7eb;
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.form-input {
    background-color: rgba(31, 41, 55, 0.5);
    border: 0.5px solid rgb(55 65 81 / 1);
    color: #e5e7eb;
    transition: all 0.3s ease;
}

.form-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

@layer base {
  :root {
        --background: 0 0% 100%;
        --foreground: 224 71.4% 4.1%;
        --card: 0 0% 100%;
        --card-foreground: 224 71.4% 4.1%;
        --popover: 0 0% 100%;
        --popover-foreground: 224 71.4% 4.1%;
        --primary: 220.9 39.3% 11%;
        --primary-foreground: 210 20% 98%;
        --secondary: 220 14.3% 95.9%;
        --secondary-foreground: 220.9 39.3% 11%;
        --muted: 220 14.3% 95.9%;
        --muted-foreground: 220 8.9% 46.1%;
        --accent: 220 14.3% 95.9%;
        --accent-foreground: 220.9 39.3% 11%;
        --destructive: 0 84.2% 60.2%;
        --destructive-foreground: 210 20% 98%;
        --border: 220 13% 91%;
        --input: 220 13% 91%;
        --ring: 224 71.4% 4.1%;
        --chart-1: 12 76% 61%;
        --chart-2: 173 58% 39%;
        --chart-3: 197 37% 24%;
        --chart-4: 43 74% 66%;
        --chart-5: 27 87% 67%;
        --radius: 0.5rem;
        --sidebar-background: 0 0% 98%;
        --sidebar-foreground: 240 5.3% 26.1%;
        --sidebar-primary: 240 5.9% 10%;
        --sidebar-primary-foreground: 0 0% 98%;
        --sidebar-accent: 240 4.8% 95.9%;
        --sidebar-accent-foreground: 240 5.9% 10%;
        --sidebar-border: 220 13% 91%;
        --sidebar-ring: 217.2 91.2% 59.8%;
    }
  .dark {
        --background: 224 71.4% 4.1%;
        --foreground: 210 20% 98%;
        --card: 224 71.4% 4.1%;
        --card-foreground: 210 20% 98%;
        --popover: 224 71.4% 4.1%;
        --popover-foreground: 210 20% 98%;
        --primary: 210 20% 98%;
        --primary-foreground: 220.9 39.3% 11%;
        --secondary: 215 27.9% 16.9%;
        --secondary-foreground: 210 20% 98%;
        --muted: 215 27.9% 16.9%;
        --muted-foreground: 217.9 10.6% 64.9%;
        --accent: 215 27.9% 16.9%;
        --accent-foreground: 210 20% 98%;
        --destructive: 0 62.8% 30.6%;
        --destructive-foreground: 210 20% 98%;
        --border: 215 27.9% 16.9%;
        --input: 215 27.9% 16.9%;
        --ring: 216 12.2% 83.9%;
        --chart-1: 220 70% 50%;
        --chart-2: 160 60% 45%;
        --chart-3: 30 80% 55%;
        --chart-4: 280 65% 60%;
        --chart-5: 340 75% 55%;
        --sidebar-background: 240 5.9% 10%;
        --sidebar-foreground: 240 4.8% 95.9%;
        --sidebar-primary: 224.3 76.3% 48%;
        --sidebar-primary-foreground: 0 0% 100%;
        --sidebar-accent: 240 3.7% 15.9%;
        --sidebar-accent-foreground: 240 4.8% 95.9%;
        --sidebar-border: 240 3.7% 15.9%;
        --sidebar-ring: 217.2 91.2% 59.8%;
    }
}

@layer base {
  * {
    @apply border-border;
    }
  body {
    @apply bg-background text-foreground;
    }
}

