/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --danger-color: #f56565;
    --warning-color: #ed8936;
    --info-color: #4299e1;
    --light-gray: #f7fafc;
    --border-color: #e2e8f0;
    --text-dark: #2d3748;
    --text-light: #718096;
}

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-gray);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Auth Pages */
.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.auth-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.auth-box {
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 28px;
}

.auth-header p {
    color: var(--text-light);
    font-size: 14px;
}

.auth-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control:disabled {
    background-color: var(--light-gray);
    cursor: not-allowed;
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.auth-footer p {
    color: var(--text-light);
    font-size: 14px;
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background-color: #cbd5e0;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: #a0aec0;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    opacity: 0.9;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    opacity: 0.9;
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-info:hover {
    opacity: 0.9;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

.btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    background: var(--light-gray);
}

.top-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    flex: 1;
}

.logo {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 30px;
}

.wallet-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--light-gray);
    padding: 8px 15px;
    border-radius: 20px;
}

.wallet-label {
    color: var(--text-light);
    font-size: 14px;
}

.wallet-balance {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 16px;
}

.user-menu {
    position: relative;
}

.btn-user-menu {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-dark);
    font-weight: 500;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    min-width: 150px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
}

.dropdown-menu a {
    display: block;
    padding: 10px 15px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s ease;
}

.dropdown-menu a:first-child {
    border-radius: 6px 6px 0 0;
}

.dropdown-menu a:last-child {
    border-radius: 0 0 6px 6px;
}

.dropdown-menu a:hover {
    background-color: var(--light-gray);
    padding-left: 20px;
}

.dashboard-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    padding: 20px 0;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--text-light);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background-color: rgba(102, 126, 234, 0.05);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

.menu-item.active {
    background-color: rgba(102, 126, 234, 0.1);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
    font-weight: 600;
}

.menu-icon {
    font-size: 18px;
}

.menu-text {
    white-space: nowrap;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
}

.main-content > h1 {
    margin-bottom: 30px;
    color: var(--text-dark);
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    display: flex;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.stat-icon {
    font-size: 36px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(102, 126, 234, 0.1);
    border-radius: 10px;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
}

/* Cards */
.content-card,
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h2,
.card-header h3 {
    color: var(--primary-color);
    margin: 0;
}

.card-body {
    padding: 25px;
}

.card-footer {
    padding: 15px 25px;
    background: var(--light-gray);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Service Cards Grid */
.services-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.service-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.service-card .card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.service-card .card-header h3 {
    color: white;
}

.service-card .card-body {
    flex: 1;
}

.service-card .price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 15px;
}

.service-card .card-footer {
    background: var(--light-gray);
}

/* Recent Activity */
.recent-activity {
    margin-top: 30px;
}

.recent-activity h2 {
    margin-bottom: 20px;
    color: var(--text-dark);
}

.activity-list {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.activity-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-item:hover {
    background-color: var(--light-gray);
}

.activity-info h4 {
    margin: 0;
    color: var(--text-dark);
    font-size: 14px;
}

.activity-info .date {
    font-size: 12px;
    color: var(--text-light);
    margin: 5px 0 0 0;
}

.activity-status {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-pending {
    background-color: rgba(237, 137, 54, 0.1);
    color: var(--warning-color);
}

.status-completed {
    background-color: rgba(72, 187, 120, 0.1);
    color: var(--success-color);
}

.status-cancelled {
    background-color: rgba(245, 101, 101, 0.1);
    color: var(--danger-color);
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table thead {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    color: var(--text-dark);
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.02);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background-color: rgba(72, 187, 120, 0.1);
    color: var(--success-color);
}

.badge-danger {
    background-color: rgba(245, 101, 101, 0.1);
    color: var(--danger-color);
}

.badge-info {
    background-color: rgba(66, 153, 225, 0.1);
    color: var(--info-color);
}

.badge-warning {
    background-color: rgba(237, 137, 54, 0.1);
    color: var(--warning-color);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border-left: 4px solid;
}

.alert-success {
    background-color: rgba(72, 187, 120, 0.1);
    border-left-color: var(--success-color);
    color: var(--success-color);
}

.alert-danger {
    background-color: rgba(245, 101, 101, 0.1);
    border-left-color: var(--danger-color);
    color: var(--danger-color);
}

.alert-info {
    background-color: rgba(66, 153, 225, 0.1);
    border-left-color: var(--info-color);
    color: var(--info-color);
}

.alert-warning {
    background-color: rgba(237, 137, 54, 0.1);
    border-left-color: var(--warning-color);
    color: var(--warning-color);
}

.alert strong {
    font-weight: 600;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-out;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    margin: 0;
    color: var(--primary-color);
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.close-btn:hover {
    color: var(--text-dark);
    transform: scale(1.2);
}

.modal-body {
    padding: 25px;
}

/* Profile Container */
.profile-container {
    max-width: 600px;
}

.profile-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Contact Container */
.contact-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.contact-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-card .card-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.contact-card h2,
.contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.contact-card p {
    color: var(--text-light);
    margin-bottom: 20px;
}

.contact-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.contact-card a:hover {
    text-decoration: underline;
}

/* Forms */
.recharge-form,
#profileForm,
#serviceForm {
    max-width: 100%;
}

.form-field-item {
    background: var(--light-gray);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.form-field-item select,
.form-field-item input {
    flex: 1;
    min-width: 120px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 13px;
}

.form-field-item label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
}

.form-field-item button {
    padding: 6px 10px;
    font-size: 12px;
}

.payment-methods {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.radio-option input[type="radio"] {
    cursor: pointer;
}

/* Utilities */
.text-center {
    text-align: center;
}

.no-data {
    text-align: center;
    color: var(--text-light);
    padding: 40px 20px;
}

.loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.required {
    color: var(--danger-color);
}

.price-display {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    padding: 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 10px;
    }
    
    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .menu-item {
        flex-shrink: 0;
        padding: 10px 15px;
    }
    
    .menu-text {
        display: none;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .header-right {
        gap: 15px;
        font-size: 12px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .services-container {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 10px;
    }
    
    .contact-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-box {
        padding: 25px;
    }
    
    .top-header {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
    }
    
    .header-left,
    .header-right {
        width: 100%;
    }
    
    .header-right {
        justify-content: space-between;
    }
    
    .logo {
        font-size: 18px;
    }
    
    .wallet-balance {
        font-size: 14px;
    }
    
    .stat-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .stat-icon {
        font-size: 28px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 12px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .main-content {
        padding: 15px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-down {
    animation: slideDown 0.3s ease-out;
}
