/* Reset and Variables */
:root {
    --primary-color: #6366f1;
    --primary-hover: #5855f1;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-color: #374151;
    --text-muted: #6b7280;
    --sidebar-bg: #111827;
    --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* App Layout */
.app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--sidebar-bg);
    color: white;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.logo {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 600;
}

.nav-menu {
    flex: 1;
    padding: 1rem 0;
}

.nav-item {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: none;
    background: none;
    color: rgba(255, 255, 255, 0.7);
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.nav-item.active {
    background: var(--primary-color);
    color: white;
    border-right: 3px solid white;
}

.nav-item i {
    width: 1.25rem;
    text-align: center;
}

/* Main Content */
.main-content {
    margin-left: 280px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    background: white;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--card-shadow);
}

.header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-color);
}

.header-left {
    flex: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.balance-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    border: 2px solid #3d3d3d;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.balance-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00d4aa, #00a8ff);
}

.balance-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

.balance-label {
    font-weight: 600;
    color: #ffffff;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.balance-label::before {
    content: '💰';
    font-size: 1rem;
}

.balance-value {
    font-weight: 700;
    color: #ffffff;
    font-size: 1.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #00d4aa, #00a8ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.refresh-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: var(--transition);
    font-size: 0.9rem;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.refresh-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Language Selector */
.language-selector {
    position: relative;
    margin-right: 1rem;
}

.language-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--light-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.875rem;
    font-weight: 500;
}

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

.language-btn i.fa-chevron-down {
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.language-btn.active i.fa-chevron-down {
    transform: rotate(180deg);
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: #2d2d2d;
    border: 1px solid #3d3d3d;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.language-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid #3d3d3d;
}

.language-option:last-child {
    border-bottom: none;
}

.language-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

.language-option.active {
    background: rgba(99, 102, 241, 0.2);
    color: var(--primary-color);
}

.language-option img {
    width: 20px;
    height: 15px;
    border-radius: 2px;
    object-fit: cover;
}

.language-option span {
    color: #ffffff;
    font-weight: 500;
    font-size: 0.875rem;
}

.language-option.active span {
    color: var(--primary-color);
}

/* Pages */
.page {
    display: none !important;
    padding: 2rem;
    flex: 1;
}

.page.active {
    display: block !important;
}

/* Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.card h3 {
    padding: 1.5rem;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card h3 i {
    color: var(--primary-color);
}

/* Dashboard */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px -8px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
}

.stat-content h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
    padding: 0;
    border: none;
}

.stat-content p {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin: 0;
}

.active-activations-section {
    background: white;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.active-activations-section h3 {
    padding: 1.5rem;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 1px solid var(--border-color);
}

/* Forms */
.form {
    padding: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-color);
    transition: var(--transition);
}

.form-group.error label {
    color: var(--danger-color);
}

.form-group.required label::after {
    content: " *";
    color: var(--danger-color);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    transition: var(--transition);
    background: white;
    position: relative;
}

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

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

.form-control.success {
    border-color: var(--success-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-group .error-message {
    color: var(--danger-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
    align-items: center;
    gap: 0.25rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.form-group.error .error-message {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.form-group .success-message {
    color: var(--success-color);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: none;
    align-items: center;
    gap: 0.25rem;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.form-group.success .success-message {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.form-group .error-message i,
.form-group .success-message i {
    animation: bounceIn 0.3s ease;
}

@keyframes bounceIn {
    0% {
        transform: scale(0.3);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.form-control.loading {
    background-image: url("data:image/svg+xml,%3csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3e%3cg fill='none' fill-rule='evenodd'%3e%3cg fill='%236366f1' fill-rule='nonzero'%3e%3cpath d='M10,1 C14.9,1 19,5.1 19,10 C19,14.9 14.9,19 10,19 C5.1,19 1,14.9 1,10 C1,5.1 5.1,1 10,1 L10,1 Z M10,3 C6.2,3 3,6.2 3,10 C3,13.8 6.2,17 10,17 C13.8,17 17,13.8 17,10 C17,6.2 13.8,3 10,3 L10,3 Z'%3e%3canimateTransform attributeName='transform' dur='1s' type='rotate' values='0 10 10;360 10 10' repeatCount='indefinite'/%3e%3c/path%3e%3c/g%3e%3c/g%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1rem 1rem;
    padding-right: 2.5rem;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
    appearance: none;
    cursor: pointer;
}

select.form-control:focus {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236366f1' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
}

select.form-control option {
    padding: 0.5rem;
    background: white;
    color: var(--text-color);
}

select.form-control option:checked {
    background: var(--primary-color);
    color: white;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-text {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.input-group {
    display: flex;
    gap: 0.75rem;
}

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

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    line-height: 1;
    position: relative;
    overflow: hidden;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3);
}

.btn:active {
    transform: translateY(1px);
}

.btn.loading {
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

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

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--text-muted);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: var(--text-color);
}

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

.btn-success:hover:not(:disabled) {
    background: #059669;
}

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

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
}

.btn-info {
    background: var(--info-color);
    color: white;
}

.btn-info:hover:not(:disabled) {
    background: #2563eb;
}

/* Activation */
.activation-card {
    border-left: 4px solid var(--primary-color);
}

.activation-info {
    padding: 1.5rem;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row .label {
    font-weight: 500;
    color: var(--text-muted);
}

.info-row .value {
    font-weight: 600;
    color: var(--dark-color);
}

.info-row .status {
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    background: var(--warning-color);
    color: white;
}

.info-row .code {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    font-family: monospace;
}

.activation-actions {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Filters */
.filters {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    gap: 1.5rem;
    align-items: end;
    flex-wrap: wrap;
}

.filters .form-group {
    margin-bottom: 0;
    min-width: 150px;
}

.filters .form-group label {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* History */
.history-container,
.prices-container,
.activations-list {
    max-height: 500px;
    overflow-y: auto;
    padding: 1.5rem;
}

.history-item {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.history-item:hover {
    box-shadow: var(--card-shadow);
    transform: translateY(-1px);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.history-id {
    font-weight: 600;
    color: var(--primary-color);
}

.history-date {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.history-cost {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.history-details {
    font-size: 0.875rem;
    color: var(--text-color);
}

.history-details p {
    margin-bottom: 0.25rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

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

.toggle-switch label {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: var(--transition);
    border-radius: 24px;
}

.toggle-switch label:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

.toggle-switch input:checked + label {
    background-color: var(--primary-color);
}

.toggle-switch input:checked + label:before {
    transform: translateX(24px);
}

/* Services/Prices */
.services-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

.tab-btn {
    padding: 1rem 1.5rem;
    border: none;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    font-weight: 500;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: var(--light-color);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

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

.prices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.price-item {
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    transition: var(--transition);
}

.price-item:hover {
    box-shadow: var(--card-shadow);
    transform: translateY(-1px);
}

.price-service {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.price-cost {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--success-color);
    margin-bottom: 0.25rem;
}

.price-count {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.price-country {
    font-size: 0.8rem;
    color: var(--primary-color);
    font-weight: 500;
    margin-top: 0.25rem;
}

/* Availability specific styles */
.availability-item {
    border-left: 4px solid var(--info-color);
}

.availability-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--info-color);
    margin-bottom: 0.25rem;
}

.availability-redirect {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.availability-status {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    text-align: center;
}

.availability-status.high {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.availability-status.medium {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.availability-status.low {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

/* TOP Countries specific styles */
.top-countries-header {
    display: flex;
    gap: 1rem;
    align-items: end;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.top-countries-header .form-group {
    margin-bottom: 0;
}

.top-country-item {
    background: linear-gradient(135deg, var(--light-color), white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.top-country-item.rank-1 {
    border-left: 4px solid #ffd700;
    background: linear-gradient(135deg, #fff9e6, white);
}

.top-country-item.rank-2 {
    border-left: 4px solid #c0c0c0;
    background: linear-gradient(135deg, #f8f9fa, white);
}

.top-country-item.rank-3 {
    border-left: 4px solid #cd7f32;
    background: linear-gradient(135deg, #fdf4e6, white);
}

.top-country-rank {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    min-width: 60px;
}

.top-country-info {
    flex: 1;
    margin-left: 1rem;
}

.top-country-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.top-country-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.top-country-stat {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.success-rate {
    color: var(--success-color);
    font-weight: 500;
}

.top-country-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Rent specific styles */
.rent-tabs {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

.rent-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.rent-pricing {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.rent-pricing h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.rent-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.rent-item.active {
    border-left: 4px solid var(--success-color);
}

.rent-item.expired {
    border-left: 4px solid var(--danger-color);
    opacity: 0.7;
}

.rent-header-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.rent-number {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.rent-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.rent-status.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.rent-status.expired {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.rent-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.rent-detail {
    display: flex;
    flex-direction: column;
}

.rent-detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.rent-detail-value {
    font-weight: 500;
    color: var(--dark-color);
}

.rent-messages {
    margin-top: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.rent-message {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.rent-message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.rent-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.pricing-row:last-child {
    border-bottom: none;
}

.price-highlight {
    color: var(--primary-color);
    font-size: 1.1rem;
}

.text-success {
    color: var(--success-color);
}

.text-danger {
    color: var(--danger-color);
}

/* Multi-Service specific styles */
.page-description {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    line-height: 1.5;
    padding: 1rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
}

.multi-tabs, .multi-header {
    display: flex;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0;
}

.multi-header {
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    margin-bottom: 1rem;
}

.multi-services-section {
    margin: 2rem 0;
}

.multi-services-section h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.service-option {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    text-align: center;
}

.service-option:hover {
    border-color: var(--primary-color);
    background: var(--light-color);
}

.service-option.selected {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.service-option.selected::after {
    content: '✓';
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
}

.service-name {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.service-price {
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.multi-pricing {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.multi-pricing h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.multi-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.multi-item.active {
    border-left: 4px solid var(--primary-color);
}

.multi-item.completed {
    border-left: 4px solid var(--success-color);
    opacity: 0.8;
}

.multi-number {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    margin-bottom: 1rem;
}

.multi-services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.service-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.service-badge.completed {
    background: var(--success-color);
}

.multi-messages {
    margin-top: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.multi-message {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    border-left: 3px solid var(--info-color);
}

.multi-message.service {
    border-left-color: var(--primary-color);
}

.multi-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.multi-message-service {
    font-weight: 600;
    color: var(--primary-color);
}

.multi-message-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.multi-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 1rem;
}

.total-row {
    border-top: 2px solid var(--primary-color);
    padding-top: 0.75rem !important;
    margin-top: 0.5rem;
    font-size: 1.1rem;
}

.savings-info {
    text-align: center;
    margin-top: 1rem;
    padding: 0.75rem;
    background: rgba(16, 185, 129, 0.1);
    border-radius: var(--border-radius);
    color: var(--success-color);
}

/* Wallet Styles */
.wallet-overview {
    margin-bottom: 2rem;
}

.crypto-deposit-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.crypto-deposit-card h3 {
    padding: 1.5rem;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.crypto-deposit-card h3 i {
    color: var(--primary-color);
}

.crypto-deposit-card .crypto-deposit-info {
    padding: 1.5rem;
}

.balance-card {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}

.balance-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.balance-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

.balance-header .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.balance-header .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.balance-amount {
    font-size: 3rem;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.balance-amount small {
    font-size: 1rem;
    opacity: 0.8;
}

.balance-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.info-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
    border-left: 4px solid var(--success-color);
}

.info-card h4 {
    color: var(--success-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card ul {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
}

.info-card li {
    padding: 0.25rem 0;
    color: var(--text-color);
}

.wallet-tabs {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.tab-button {
    flex: 1;
    padding: 1rem 2rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

.tab-button.active {
    color: var(--primary-color);
    background: #f8fafc;
    border-bottom: 2px solid var(--primary-color);
}

.tab-content {
    display: none;
    padding: 2rem;
}

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

.payment-methods {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.payment-method {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.payment-method:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.15);
}

.payment-method.selected {
    border-color: var(--primary-color);
    background: #f8fafc;
}

.method-icon {
    font-size: 2rem;
    color: var(--primary-color);
    min-width: 60px;
    text-align: center;
}

.method-info {
    flex: 1;
}

.method-info h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.method-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.method-action .fee {
    color: var(--success-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.crypto-deposit-info {
    margin-top: 2rem;
}

.eth-address-card {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    border-radius: 16px;
    padding: 2rem;
    border: 2px solid #3d3d3d;
    margin-bottom: 2rem;
}

.address-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.crypto-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #627eea, #8a9ef8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.crypto-info h4 {
    color: #ffffff;
    margin: 0;
    font-size: 1.25rem;
}

.crypto-info p {
    color: #cccccc;
    margin: 0.25rem 0 0 0;
    font-size: 0.9rem;
}

.address-display {
    margin-bottom: 1.5rem;
}

.address-display label {
    color: #ffffff;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.address-input-group {
    display: flex;
    gap: 0.5rem;
}

.address-input-group input {
    flex: 1;
    background: #333;
    border: 1px solid #555;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.crypto-warning {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    color: #ffc107;
}

.crypto-warning i {
    font-size: 1.25rem;
    margin-top: 0.25rem;
}

.crypto-warning strong {
    color: #ffffff;
}

.crypto-warning ul {
    margin: 0.5rem 0 0 0;
    color: #cccccc;
}

.crypto-warning li {
    margin-bottom: 0.25rem;
}

.deposit-form {
    border-top: 1px solid var(--border-color);
    padding-top: 2rem;
    margin-top: 2rem;
}

.amount-input {
    position: relative;
}

.amount-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.amount-btn {
    padding: 0.5rem 1rem;
    background: var(--light-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

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

.deposit-fees {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: var(--light-color);
    border-radius: 6px;
    font-size: 0.9rem;
}

.payment-form {
    margin: 1.5rem 0;
}

.crypto-options {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.crypto-btn {
    flex: 1;
    padding: 1rem;
    background: var(--light-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    font-weight: 500;
}

.crypto-btn:hover,
.crypto-btn.selected {
    border-color: var(--primary-color);
    background: #f8fafc;
    color: var(--primary-color);
}

.transaction-list {
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.transaction-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.transaction-item:hover {
    background: var(--light-color);
}

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

.transaction-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    width: 40px;
    text-align: center;
}

.transaction-icon.deposit {
    color: var(--success-color);
}

.transaction-icon.payment {
    color: var(--danger-color);
}

.transaction-info {
    flex: 1;
}

.transaction-info h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.transaction-info p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.transaction-amount {
    font-weight: 600;
    font-size: 1.1rem;
}

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

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

.services-breakdown {
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

/* Webhook specific styles */
.webhook-status {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.webhook-status h4 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.webhook-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.webhook-info {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--info-color);
}

.webhook-info h4 {
    margin-bottom: 1rem;
    color: var(--info-color);
}

.info-box {
    background: white;
    padding: 1rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.info-box pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    font-size: 0.85rem;
    margin: 0.5rem 0;
}

.info-box code {
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
}

.webhook-status-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.webhook-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.webhook-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.webhook-status-badge.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.webhook-status-badge.inactive {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.webhook-status-badge.unknown {
    background: rgba(156, 163, 175, 0.1);
    color: var(--text-muted);
}

.webhook-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 0.5rem;
}

.webhook-detail {
    display: flex;
    flex-direction: column;
}

.webhook-detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.webhook-detail-value {
    font-weight: 500;
    color: var(--dark-color);
}

.webhook-logs {
    margin-top: 1rem;
    max-height: 200px;
    overflow-y: auto;
}

.webhook-log {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    border-left: 3px solid var(--info-color);
}

.webhook-log.success {
    border-left-color: var(--success-color);
}

.webhook-log.error {
    border-left-color: var(--danger-color);
}

.webhook-log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.webhook-log-status {
    font-weight: 600;
}

.webhook-log-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Notifications */
.notifications {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.notification {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    box-shadow: var(--card-shadow);
    max-width: 400px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideIn 0.3s ease-out;
}

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

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--danger-color);
}

.notification.info {
    border-left: 4px solid var(--info-color);
}

.notification.warning {
    border-left: 4px solid var(--warning-color);
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--text-muted);
    margin-left: auto;
}

/* Loading */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    color: white;
    font-size: 1.125rem;
    font-weight: 500;
}

/* No Data */
.no-data {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    padding: 2rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

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

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

    .form-row {
        grid-template-columns: 1fr;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .activation-actions {
        flex-direction: column;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 768px) {
    .header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .page {
        padding: 1rem;
    }

    .card h3 {
        padding: 1rem;
    }

    .form {
        padding: 1rem;
    }

    .history-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .notifications {
        left: 1rem;
        right: 1rem;
    }

    .notification {
        max-width: none;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}