/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #000000;
    color: #E5E7EB;
    line-height: 1.6;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #000000;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    font-size: 32px;
    font-weight: 700;
    color: #22C55E;
    margin-bottom: 8px;
}

.login-logo-img {
    max-width: 300px;
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.login-subtitle {
    color: #9CA3AF;
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-error-box {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #FCA5A5;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 14px;
    margin-bottom: 20px;
}

.login-links {
    margin-top: 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.login-links a {
    color: #22C55E;
    text-decoration: none;
    font-size: 14px;
}

.login-links a:hover {
    color: #4ADE80;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
    padding-top: 40px;
}

/* Top Header Bar */
.top-header {
    position: fixed;
    top: 0;
    right: 0;
    left: 240px;
    height: 40px;
    background: #000000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 24px;
}

.top-header-content {
    display: flex;
    gap: 24px;
    align-items: center;
}

.top-link {
    color: #9CA3AF;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s;
}

.top-link:hover {
    color: #E5E7EB;
}

/* Sidebar */
.sidebar {
    width: 240px;
    background: #000000;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 100;
}


.dropdown-icon {
    font-size: 12px;
    color: #6B7280;
    margin-left: 4px;
}

.sidebar-brand {
    padding: 24px 16px 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    text-align: center;
}

.sidebar-logo {
    width: 180px;
    max-width: 220px;
    height: auto;
    display: block;
}

.brand-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.brand-name {
    font-size: 20px;
    font-weight: 700;
    color: #E5E7EB;
    margin: 0;
    line-height: 1;
}

.brand-version {
    font-size: 12px;
    color: #9CA3AF;
    font-weight: 400;
}

.sidebar-nav {
    flex: 1;
    padding: 24px 0 8px 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: #9CA3AF;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 14px;
    border-left: 2px solid transparent;
}

.nav-item:hover {
    background: transparent;
    color: #E5E7EB;
}

.nav-item.active {
    background: transparent;
    color: #E5E7EB;
    border-left-color: #22C55E;
}

.nav-icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon.bi {
    font-size: 16px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.user-info-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #22C55E;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000000;
    font-weight: 600;
    font-size: 12px;
    flex-shrink: 0;
}

.user-email {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-width: 0;
    font-size: 12px;
    color: #6B7280;
    transition: color 0.2s;
}

.user-email:hover {
    color: #E5E7EB;
}

.user-dropdown {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    margin: 0 8px;
    overflow: hidden;
    z-index: 200;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #E5E7EB;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: rgba(34, 197, 94, 0.1);
    color: #22C55E;
}

.dropdown-item i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.ellipsis {
    color: #6B7280;
    font-size: 14px;
    display: flex;
    align-items: center;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 240px;
    margin-top: 40px;
    padding: 32px;
    min-height: calc(100vh - 40px);
}

.content-area {
    max-width: 1400px;
    margin: 0 auto;
}

/* Page Header */
.page-header {
    margin-bottom: 32px;
}

.page-title {
    font-size: 32px;
    font-weight: 600;
    color: #E5E7EB;
    margin: 0;
}

/* Page Toolbar */
.page-toolbar {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-bar {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 400px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6B7280;
    font-size: 16px;
    z-index: 1;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 10px 12px 10px 40px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #E5E7EB;
    font-size: 14px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #22C55E;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.search-input::placeholder {
    color: #6B7280;
}

.toolbar-filters {
    display: flex;
    gap: 12px;
}

.filter-select {
    padding: 10px 32px 10px 12px;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #E5E7EB;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 4L6 8L10 4' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: all 0.2s;
}

.filter-select:focus {
    outline: none;
    border-color: #22C55E;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.filter-select option {
    background: #000000;
    color: #E5E7EB;
    padding: 8px;
}

.filter-select option:hover {
    background: rgba(34, 197, 94, 0.1);
}

.filter-select option:checked {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
}

/* Views */
.view {
    display: none;
}

.view.active {
    display: block;
}

/* Content Cards */
.content-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.card-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #E5E7EB;
}

.card-body {
    padding: 24px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.metrics-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.2s;
}

.stat-card:hover {
    border-color: #22C55E;
}

.stat-icon {
    font-size: 32px;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: #22C55E;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 14px;
    color: #9CA3AF;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: transparent;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    color: #E5E7EB;
    font-size: 14px;
}

.data-table tbody tr:hover {
    background: transparent;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 24px;
    color: #6B7280;
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: #E5E7EB;
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 14px;
    margin-bottom: 24px;
    color: #9CA3AF;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
}

.badge-pending {
    background: rgba(251, 191, 36, 0.2);
    color: #FBBF24;
}

.badge-processing {
    background: rgba(59, 130, 246, 0.2);
    color: #3B82F6;
}

.badge-ready {
    background: rgba(34, 197, 94, 0.2);
    color: #22C55E;
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: #EF4444;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #E5E7EB;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #E5E7EB;
    font-size: 14px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: #22C55E;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.form-input::placeholder {
    color: #6B7280;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: #22C55E;
    color: #000000;
}

.btn-primary:hover {
    background: #16A34A;
    transform: translateY(-1px);
}

.btn-secondary {
    background: transparent;
    color: #E5E7EB;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Settings */
.settings-section {
    margin-bottom: 32px;
}

.settings-section h4 {
    margin-bottom: 16px;
    color: #E5E7EB;
    font-size: 18px;
}

.plan-card {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 24px;
}

.plan-info h3 {
    color: #22C55E;
    font-size: 24px;
    margin-bottom: 12px;
}

.plan-info p {
    color: #9CA3AF;
    margin-bottom: 8px;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.plan-option {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 24px;
    transition: all 0.2s;
}

.plan-option:hover {
    border-color: #22C55E;
    transform: translateY(-2px);
}

.plan-option.plan-featured {
    border-color: #22C55E;
    background: transparent;
}

.plan-option h4 {
    font-size: 20px;
    color: #E5E7EB;
    margin-bottom: 12px;
}

.plan-price {
    font-size: 28px;
    font-weight: 700;
    color: #22C55E;
    margin-bottom: 16px;
}

.plan-option ul {
    list-style: none;
    margin-bottom: 20px;
}

.plan-option ul li {
    color: #9CA3AF;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.plan-option ul li:last-child {
    border-bottom: none;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    color: #E5E7EB;
}

.modal-close {
    background: none;
    border: none;
    color: #9CA3AF;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #000000;
    color: #E5E7EB;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.info-banner {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.info-banner i {
    color: #3B82F6;
    font-size: 18px;
}

.info-banner span {
    color: #E5E7EB;
    font-size: 14px;
}

/* Code */
code {
    background: #000000;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #22C55E;
}

/* Token Preview */
.token-preview {
    display: inline-block;
    background: #111111;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #E5E7EB;
    min-width: 120px;
}

.token-preview-text {
    color: #E5E7EB;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    letter-spacing: 0.3px;
}

/* Chart Container */
#metrics-chart {
    max-height: 400px;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: #1F2937;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #374151;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
    
    .top-header {
        left: 200px;
    }
    
    .page-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-bar {
        max-width: 100%;
    }
}
