


.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 12px 24px;
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    letter-spacing: 0.02em;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.btn:hover::before {
    opacity: 1;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
    transform: translateY(-1px);
}

.btn-success {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-success:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
    transform: translateY(-1px);
}

.btn-danger {
    background: var(--gradient-warm);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: var(--backdrop-blur);
}

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

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-sm {
    padding: 8px 16px;
    font-size: var(--text-xs);
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 14px 32px;
    font-size: var(--text-base);
    border-radius: var(--radius-lg);
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: var(--radius-md);
}

.btn-icon svg {
    width: 20px;
    height: 20px;
}

.btn .spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.btn:disabled, .btn.loading {
    opacity: 0.6;
    pointer-events: none;
}


.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    backdrop-filter: var(--backdrop-blur);
    transition: all var(--transition-base);
}

.card-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--backdrop-blur);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

.card-gradient {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
}

.card-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
}

.card-body {
    color: var(--text-secondary);
}


.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-base);
    transition: all var(--transition-fast);
}

.form-input:focus {
    border-color: var(--primary-500);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    background: rgba(255, 255, 255, 0.08);
}

.form-input::placeholder {
    color: var(--text-muted);
}

.form-input.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}

.form-hint {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: var(--space-1);
}

.form-error {
    font-size: var(--text-xs);
    color: var(--danger);
    margin-top: var(--space-1);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group .input-icon {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.input-group .form-input {
    padding-left: 44px;
}

.input-group .input-action {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: color var(--transition-fast);
}

.input-group .input-action:hover {
    color: var(--text-primary);
}

.input-group .input-action svg {
    width: 20px;
    height: 20px;
}

select.form-input {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}


.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--bg-input);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-base);
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 2px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--text-muted);
    border-radius: 50%;
    transition: all var(--transition-base);
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary-600);
    border-color: var(--primary-500);
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateY(-50%) translateX(22px);
    background: white;
}


.tabs {
    display: flex;
    gap: var(--space-1);
    background: var(--bg-input);
    border-radius: var(--radius-lg);
    padding: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-muted);
    background: transparent;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    text-align: center;
}

.tab-btn:hover {
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.04);
}

.tab-btn.active {
    color: white;
    background: var(--gradient-primary);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.tab-content {
    display: none;
    animation: fadeIn var(--transition-base) ease-out;
}

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


.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: var(--z-modal-backdrop);
    display: none;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn var(--transition-fast) ease-out;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    width: 100%;
    max-width: var(--max-width);
    max-height: 85vh;
    overflow-y: auto;
    animation: slideUp var(--transition-base) ease-out;
    padding: var(--space-6);
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: var(--border-color);
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-5);
}

.modal-title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    margin-bottom: var(--space-5);
    text-align: center;
}

.modal-body {
    margin-bottom: var(--space-5);
}

.modal-footer {
    display: flex;
    gap: var(--space-3);
}

.modal-footer .btn {
    flex: 1;
}


@media (min-width: 768px) {
    .modal-overlay {
        align-items: center;
    }

    .modal {
        border-radius: var(--radius-2xl);
        max-width: 500px;
        animation: scaleIn var(--transition-base) ease-out;
    }
}


.toast-container {
    position: fixed;
    top: calc(var(--header-height) + 10px);
    left: 50%;
    transform: translateX(-50%);
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    width: 90%;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 14px 18px;
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    animation: fadeInDown var(--transition-base) ease-out;
    pointer-events: all;
    backdrop-filter: var(--backdrop-blur);
}

.toast.toast-success {
    border-left: 3px solid var(--success);
}

.toast.toast-error {
    border-left: 3px solid var(--danger);
}

.toast.toast-warning {
    border-left: 3px solid var(--warning);
}

.toast.toast-info {
    border-left: 3px solid var(--info);
}

.toast-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.toast-message {
    flex: 1;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
}

.toast.removing {
    animation: fadeOut var(--transition-fast) ease-out forwards;
}

@keyframes fadeOut {
    to { opacity: 0; transform: translateY(-10px); }
}


.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    border-radius: var(--radius-full);
    letter-spacing: 0.02em;
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-400);
    border: 1px solid rgba(99, 102, 241, 0.2);
}


.progress {
    width: 100%;
    height: 6px;
    background: var(--bg-input);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-slow);
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}


.empty-state {
    text-align: center;
    padding: var(--space-10) var(--space-4);
    color: var(--text-muted);
}

.empty-state-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto var(--space-4);
    opacity: 0.5;
}

.empty-state-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.empty-state-text {
    font-size: var(--text-sm);
    max-width: 280px;
    margin: 0 auto;
}


.loader {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-8);
}

.loader-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-color);
    border-top-color: var(--primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}


.page-loader {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal);
    flex-direction: column;
    gap: var(--space-4);
}


.divider {
    height: 1px;
    background: var(--border-color);
    margin: var(--space-5) 0;
}

.divider-text {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-muted);
    font-size: var(--text-sm);
    margin: var(--space-5) 0;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}


.captcha-box {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.captcha-display {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    background: linear-gradient(135deg, var(--primary-900), var(--primary-800));
    border: 1px solid var(--primary-700);
    border-radius: var(--radius-md);
    font-family: 'Courier New', monospace;
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    letter-spacing: 6px;
    color: var(--primary-300);
    user-select: none;
    position: relative;
    overflow: hidden;
    min-width: 140px;
    text-align: center;
}

.captcha-display::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 3px,
        rgba(99, 102, 241, 0.05) 3px,
        rgba(99, 102, 241, 0.05) 6px
    );
}

.captcha-refresh {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.captcha-refresh:hover {
    color: var(--primary-400);
    border-color: var(--primary-500);
}

.captcha-refresh svg {
    width: 20px;
    height: 20px;
}


.list-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
    border-bottom: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

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

.list-item:hover {
    background: var(--bg-hover);
}

.list-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-bold);
    color: white;
    font-size: var(--text-sm);
    flex-shrink: 0;
}

.list-info {
    flex: 1;
    min-width: 0;
}

.list-title {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-subtitle {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
}

.list-value {
    text-align: right;
    flex-shrink: 0;
}

.list-amount {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
}

.list-amount.positive {
    color: var(--success);
}

.list-amount.negative {
    color: var(--danger);
}


.stat-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

.stat-icon.purple { background: var(--gradient-primary); }
.stat-icon.green { background: var(--gradient-accent); }
.stat-icon.orange { background: var(--gradient-warm); }
.stat-icon.blue { background: linear-gradient(135deg, #3b82f6, #06b6d4); }

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-bottom: 2px;
}

.stat-value {
    font-size: var(--text-lg);
    font-weight: var(--font-bold);
    color: var(--text-primary);
}


.copy-box {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 8px 12px;
}

.copy-text {
    flex: 1;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-btn {
    background: var(--primary-600);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.copy-btn:hover {
    background: var(--primary-500);
}

.copy-btn.copied {
    background: var(--success);
}


.marquee-container {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.marquee-icon {
    color: var(--primary-400);
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
}

.marquee-icon svg {
    width: 18px;
    height: 18px;
}

.marquee-text {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-text span {
    display: inline-block;
    animation: marqueeScroll 15s linear infinite;
    font-size: var(--text-sm);
    color: var(--text-accent);
}

@keyframes marqueeScroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}


.slider-container {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 16/7;
}

.slider-track {
    display: flex;
    transition: transform var(--transition-slow);
    height: 100%;
}

.slider-slide {
    min-width: 100%;
    height: 100%;
}

.slider-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slider-dots {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.slider-dot.active {
    width: 24px;
    border-radius: 4px;
    background: white;
}
