:root {
    --bb-yellow: #F8E71C;
    --bb-blue: #0033A0;
    --bb-dark-blue: #001A5E;
    --bb-light-blue: #0066CC;
    --bb-gray: #F5F5F5;
    --bb-dark-gray: #333333;
    --bb-green: #00A859;
    --bb-red: #D0021B;
    --bb-orange: #FF6B00;
    --bb-purple: #8E44AD;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--bb-gray);
    color: var(--bb-dark-gray);
    line-height: 1.6;
}

.container {
    display: flex;
    min-height: 100vh;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--bb-blue) 0%, var(--bb-light-blue) 100%);
    padding: 20px;
}

.login-card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 450px;
    padding: 40px;
}

.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.bbts-logo {
    background-color: var(--bb-blue);
    color: white;
    padding: 15px 30px;
    border-radius: 8px;
    display: inline-block;
    margin-bottom: 15px;
}

.bbts-logo span {
    font-weight: bold;
    font-size: 2rem;
}

.login-logo h1 {
    color: var(--bb-blue);
    font-size: 1.5rem;
    font-weight: 600;
}

.tab-container {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    transition: all 0.3s;
}

.tab.active {
    border-bottom: 3px solid var(--bb-yellow);
    color: var(--bb-blue);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.auth-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--bb-dark-gray);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--bb-light-blue);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.checkbox-group input {
    margin-right: 10px;
}

.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background-color: var(--bb-yellow);
    color: var(--bb-dark-gray);
}

.btn-primary:hover {
    background-color: #e6d419;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--bb-light-blue);
    color: white;
}

.btn-secondary:hover {
    background-color: #0055aa;
    transform: translateY(-2px);
}

.btn-success {
    background-color: var(--bb-green);
    color: white;
}

.btn-success:hover {
    background-color: #008e47;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: var(--bb-red);
    color: white;
}

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

.wallet-connect {
    text-align: center;
    margin-top: 15px;
    padding: 12px;
    border: 2px dashed #ddd;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 600;
}

.wallet-connect:hover {
    background-color: var(--bb-gray);
    border-color: var(--bb-light-blue);
}

/* Sidebar */
.sidebar {
    width: 280px;
    background-color: var(--bb-blue);
    color: white;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 25px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.bbts-logo-small {
    background-color: white;
    color: var(--bb-blue);
    padding: 8px 12px;
    border-radius: 4px;
    margin-right: 12px;
}

.bbts-logo-small span {
    font-weight: bold;
    font-size: 1.1rem;
}

.platform-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
}

.menu-item {
    padding: 16px 25px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-item.active {
    background-color: var(--bb-dark-blue);
    border-left-color: var(--bb-yellow);
}

.menu-item i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.top-nav {
    background-color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #eee;
}

/* User Info Clicável */
.user-dropdown {
    position: relative;
}

.user-info {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.3s;
}

.user-info:hover {
    background-color: var(--bb-gray);
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--bb-light-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 12px;
    font-size: 1.2rem;
}

.user-company {
    font-size: 0.85rem;
    color: #888;
}

.user-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    min-width: 200px;
    z-index: 1000;
    display: none;
    border: 1px solid #eee;
}

.user-menu.active {
    display: block;
}

.user-menu-item {
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: background-color 0.3s;
    border-bottom: 1px solid #f5f5f5;
}

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

.user-menu-item:hover {
    background-color: var(--bb-gray);
}

.user-menu-item i {
    width: 16px;
    text-align: center;
    color: var(--bb-blue);
}

.content {
    padding: 30px;
    flex: 1;
    overflow-y: auto;
    background-color: var(--bb-gray);
}

.page-content {
    display: none;
}

.page-content.active {
    display: block;
}

.page-title {
    margin-bottom: 25px;
    color: var(--bb-blue);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.page-title h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.card {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #eee;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--bb-gray);
    flex-wrap: wrap;
    gap: 15px;
}

.card-title {
    font-size: 1.3rem;
    color: var(--bb-blue);
    font-weight: 600;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    text-align: center;
    transition: transform 0.3s;
    border-left: 5px solid transparent;
}

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

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: bold;
    margin: 10px 0;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.stat-energy {
    border-left-color: var(--bb-blue);
}

.stat-energy .stat-icon {
    color: var(--bb-blue);
}

.stat-fleet {
    border-left-color: var(--bb-green);
}

.stat-fleet .stat-icon {
    color: var(--bb-green);
}

.stat-tokens {
    border-left-color: var(--bb-yellow);
}

.stat-tokens .stat-icon {
    color: var(--bb-yellow);
}

.stat-compensated {
    border-left-color: var(--bb-red);
}

.stat-compensated .stat-icon {
    color: var(--bb-red);
}

/* Charts */
.chart-container {
    height: 350px;
    margin-bottom: 30px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.chart-placeholder {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--bb-blue);
    font-weight: 600;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.data-table th, .data-table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background-color: var(--bb-gray);
    color: var(--bb-blue);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

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

.data-table tr:last-child td {
    border-bottom: none;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background-color: #e6f7f0;
    color: var(--bb-green);
}

.badge-warning {
    background-color: #fff8e6;
    color: #e6a700;
}

.badge-danger {
    background-color: #ffe6e6;
    color: var(--bb-red);
}

.badge-info {
    background-color: #e6f3ff;
    color: var(--bb-light-blue);
}

/* Forms */
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

.input-group {
    display: flex;
    gap: 10px;
}

.input-group .form-control {
    flex: 1;
}

/* Tabs */
.content-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.content-tab {
    padding: 12px 25px;
    cursor: pointer;
    font-weight: 600;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.content-tab.active {
    color: var(--bb-blue);
    border-bottom-color: var(--bb-yellow);
}

/* Notifications */
.notification-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: flex-start;
    transition: background-color 0.3s;
}

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

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

.notification-icon {
    margin-right: 15px;
    font-size: 1.2rem;
    margin-top: 2px;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.notification-time {
    font-size: 0.8rem;
    color: #888;
    margin-top: 5px;
}

.alert-high {
    border-left: 4px solid var(--bb-red);
}

.alert-medium {
    border-left: 4px solid var(--bb-orange);
}

.alert-low {
    border-left: 4px solid var(--bb-green);
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.modal-header {
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.3rem;
    color: var(--bb-blue);
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 20px 25px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Blockchain specific */
.blockchain-address {
    font-family: monospace;
    background: #f5f5f5;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    word-break: break-all;
}

.transaction-hash {
    font-family: monospace;
    color: var(--bb-light-blue);
    text-decoration: none;
}

.transaction-hash:hover {
    text-decoration: underline;
}

/* Token cards */
.token-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.token-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--bb-yellow);
}

.token-value {
    font-size: 2rem;
    font-weight: bold;
    color: var(--bb-yellow);
    margin: 10px 0;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ddd;
}

/* Utility classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-success { color: var(--bb-green); }
.text-warning { color: var(--bb-orange); }
.text-danger { color: var(--bb-red); }
.text-info { color: var(--bb-light-blue); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }

.hidden { display: none; }

/* Notification styles */
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOut {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.notification-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 10000;
    max-width: 400px;
    animation: slideIn 0.3s ease;
}

.notification-success {
    background: var(--bb-green);
    color: white;
}

.notification-error {
    background: var(--bb-red);
    color: white;
}

.notification-info {
    background: var(--bb-light-blue);
    color: white;
}

/* Modal Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

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

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.modal-content {
    background: var(--card-bg, white);
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}