/* Estilos Gerais - IzPass Premium Theme */
:root {
    --primary-color: #304356;
    --primary-dark: #1d2b39;
    --primary-light: #4b5e73;
    --secondary-color: #4cc9f0;
    --success-color: #0cce98;
    --danger-color: #ef476f;
    --warning-color: #ffd166;
    --info-color: #118ab2;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    --sidebar-width: 280px;
    --border-radius: 0.5rem;
    --transition-speed: 0.3s;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --box-shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--gray-800);
    overflow-x: hidden;
}

/* Layout Principal */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    padding-top: 70px;
}

.sidebar-expanded .main-content {
    margin-left: var(--sidebar-width);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #304356 0%, #1a1f25 100%);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    transform: translateX(-100%);
}
.bg-secondary {
    background: linear-gradient(135deg, #304356 0%, #1a1f25 100%);
}
.sidebar.show {
    transform: translateX(0);
}

.sidebar-logo {
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.sidebar-logo img {
    max-height: 40px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu-item {
    padding: 0.75rem 1.5rem;
    margin-bottom: 0.25rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.sidebar-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--secondary-color);
    cursor: pointer;
}

.sidebar-menu-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    border-left-color: white;
}

.sidebar-menu-item i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.sidebar-footer {
    padding: 1rem;
    position: absolute;
    bottom: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.1);
    text-align: center;
    font-size: 0.8rem;
}

.sidebar-toggle {
    position: fixed;
    left: 1rem;
    top: 1rem;
    z-index: 1050;
    background-color: var(--primary-color);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.sidebar-toggle:hover {
    background-color: var(--primary-dark);
}

/* Navbar */
.navbar {
    background-color: white !important;
    box-shadow: var(--box-shadow);
    padding: 0.8rem 1.5rem;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1030;
}

.navbar-brand {
    display: none !important;
}

.navbar-brand i,
.navbar-brand span {
    display: none !important;
}

.navbar .navbar-toggler {
    border-color: transparent;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all 0.2s;
}

.navbar-nav .nav-link:hover {
    background-color: var(--gray-100);
}

.navbar-nav .nav-link.active {
    background-color: var(--gray-200);
    color: var(--primary-color);
}

.user-dropdown .dropdown-toggle {
    display: flex;
    align-items: center;
    font-weight: 500;
}

.user-dropdown .dropdown-toggle img,
.user-dropdown .dropdown-toggle .avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    margin-right: 0.5rem;
    border: 2px solid var(--gray-200);
}

.user-dropdown .dropdown-toggle .avatar-circle {
    background: linear-gradient(135deg, #304356 0%, #1a1f25 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.user-dropdown .dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow-lg);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
}

.user-dropdown .dropdown-item {
    padding: 0.6rem 1.2rem;
    font-weight: 500;
}

.user-dropdown .dropdown-item i {
    margin-right: 0.5rem;
    opacity: 0.7;
}

.user-dropdown .dropdown-divider {
    margin: 0.3rem 0;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--box-shadow-lg);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
}

.card-header h5, .card-header .h5 {
    margin-bottom: 0;
    font-weight: 600;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background-color: transparent;
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
}

/* Password Cards */
.password-item .card {
    height: 100%;
}

.password-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.password-card-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: linear-gradient(45deg, var(--primary-light), var(--secondary-color));
    color: white;
    font-size: 1.5rem;
    margin-right: 1rem;
}

.password-card-title {
    flex-grow: 1;
}

.password-text {
    font-family: 'JetBrains Mono', monospace;
    padding: 0.5rem;
    background-color: var(--gray-100);
    border-radius: 4px;
    letter-spacing: 1px;
}

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

.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background-color: var(--gray-100);
    color: var(--gray-700);
    border: none;
    transition: all 0.2s;
}

.action-btn:hover {
    background-color: var(--gray-200);
    color: var(--primary-color);
}

.action-btn.btn-toggle {
    background-color: var(--gray-200);
}

.action-btn.btn-copy:hover {
    background-color: var(--success-color);
    color: white;
}

.action-btn.btn-delete:hover {
    background-color: var(--danger-color);
    color: white;
}

/* Badge */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
    border-radius: 50rem;
}

.badge.bg-soft-primary {
    background-color: rgba(67, 97, 238, 0.15);
    color: var(--primary-color);
}

.badge.bg-soft-success {
    background-color: rgba(6, 214, 160, 0.15);
    color: var(--success-color);
}

.badge.bg-soft-info {
    background-color: rgba(17, 138, 178, 0.15);
    color: var(--info-color);
}

.badge.bg-soft-warning {
    background-color: rgba(255, 209, 102, 0.15);
    color: #e0b341;
}

.badge-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: 6px;
}

/* Buttons */
.btn {
    font-weight: 500;
    border-radius: var(--border-radius);
    padding: 0.55rem 1.25rem;
    letter-spacing: 0.3px;
    box-shadow: none !important;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-soft-primary {
    background-color: rgba(67, 97, 238, 0.15);
    color: var(--primary-color);
    border: none;
}

.btn-soft-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-icon-sm {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
}

.btn-floating {
    position: fixed;
    right: 2rem;
    bottom: 2rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.35);
    z-index: 1030;
    font-size: 1.5rem;
    transition: all 0.3s;
}

.btn-floating:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(67, 97, 238, 0.45);
}

/* Forms */
.form-control {
    padding: 0.55rem 1rem;
    border-color: var(--gray-300);
    border-radius: var(--border-radius);
}

.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.15);
    border-color: var(--primary-color);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-text {
    color: var(--gray-600);
}

.input-group-text {
    background-color: var(--gray-100);
    border-color: var(--gray-300);
}

.is-invalid {
    border-color: var(--danger-color);
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.85rem;
}

/* Search */
.search-form {
    position: relative;
    max-width: 350px;
    margin: 0 auto;
    align-self: center;
}

.search-form .form-control {
    padding-left: 2.5rem;
    height: 42px;
    background-color: var(--gray-100);
    border: none;
}

.search-form .form-control:focus {
    background-color: white;
    box-shadow: var(--box-shadow);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
}

/* Empty State */
.empty-state {
    padding: 5rem 2rem;
    text-align: center;
}

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--gray-400);
    background: linear-gradient(45deg, var(--primary-light), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow-lg);
    overflow: hidden;
}

.modal-header {
    border-bottom: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--gray-200);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
}

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

.animate-fade-in {
    animation: fadeIn 0.5s ease-out;
}

.password-item {
    animation: fadeIn 0.5s ease-out;
    animation-fill-mode: both;
}

@media (min-width: 768px) {
    .password-item:nth-child(1) { animation-delay: 0.05s; }
    .password-item:nth-child(2) { animation-delay: 0.1s; }
    .password-item:nth-child(3) { animation-delay: 0.15s; }
    .password-item:nth-child(4) { animation-delay: 0.2s; }
    .password-item:nth-child(5) { animation-delay: 0.25s; }
    .password-item:nth-child(6) { animation-delay: 0.3s; }
}

/* Tooltip */
.tooltip {
    font-size: 0.85rem;
}

.tooltip-inner {
    box-shadow: var(--box-shadow);
    padding: 0.4rem 0.8rem;
}

/* Media queries */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding-top: 70px;
    }

    .sidebar-expanded .main-content {
        margin-left: 0;
    }

    .navbar {
        padding: 0.8rem 1rem;
    }
    
    .container-fluid {
        padding-left: 0;
        padding-right: 0;
    }
    
    .btn-floating {
        display: flex;
    }

    .btn-link.position-fixed {
        display: flex !important;
    }

    .search-form {
        margin: 0 auto;
    }

    .navbar-brand {
        display: flex !important;
    }
}

@media (min-width: 992px) {
    .sidebar {
        transform: translateX(0);
    }
    
    .btn-link.position-fixed {
        display: none !important;
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
    }

    .navbar-brand {
        display: flex !important;
    }
    
    .navbar-brand i,
    .navbar-brand span {
        display: inline !important;
    }
}

@media (max-width: 768px) {
    .card-body {
        padding: 1.25rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
    }
    
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Login Page Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 2rem 1rem;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.login-header {
    background: white;
    padding: 2.5rem 2rem;
    text-align: center;
}

.login-logo {
    margin-bottom: 1rem;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.login-logo i {
    margin-right: 0.5rem;
}

.login-body {
    padding: 2rem;
    background-color: white;
}

.login-body .form-control {
    height: 50px;
}

.login-footer {
    padding: 1.5rem 2rem;
    background-color: var(--gray-100);
    text-align: center;
}

.login-footer .badge {
    background-color: var(--gray-200);
    color: var(--gray-700);
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
}

/* PWA Styles */
@media (display-mode: standalone) {
    body {
        padding-top: 0;
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .navbar {
        padding-top: calc(0.8rem + env(safe-area-inset-top));
    }
    
    .btn-floating {
        bottom: calc(2rem + env(safe-area-inset-bottom));
    }
}

/* Offcanvas Menu */
.offcanvas {
    width: 280px;
}

.offcanvas-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.offcanvas .sidebar-menu {
    padding: 0;
    margin: 0;
    list-style: none;
}

.offcanvas .sidebar-menu-item {
    padding: 0.5rem 1.5rem;
    transition: all 0.2s ease;
}

.offcanvas .sidebar-menu-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.offcanvas .sidebar-menu-item.active {
    background-color: rgba(67, 97, 238, 0.1);
}

.offcanvas .sidebar-menu-item a {
    padding: 0.5rem 0;
}

.offcanvas .sidebar-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

/* Mobile Menu Button */
.btn-link.position-fixed {
    position: relative;
    background-color: transparent;
    border: none;
    box-shadow: none;
    padding: 0.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-right: 0.5rem;
    z-index: 1050;
}

.btn-link.position-fixed:hover {
    background-color: transparent;
}