/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    color: #333;
    overflow-x: hidden;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    z-index: 1000;
    overflow-y: auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.logo i {
    font-size: 32px;
}

.logo h2 {
    font-size: 22px;
    font-weight: 600;
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.nav-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.nav-item.active {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 500;
}

.nav-item i {
    font-size: 18px;
    width: 20px;
}

/* Main Content */
.main-content {
    margin-left: 260px;
    min-height: 100vh;
    background-color: #f5f7fa;
}

.top-header {
    background: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.top-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4a5568;
}

.user-info i {
    font-size: 24px;
}

/* Screen Management */
.screen {
    display: none;
    padding: 30px;
    animation: fadeIn 0.3s ease;
}

.screen.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #2d3748;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.metric-icon.blue {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.metric-icon.green {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.metric-icon.orange {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.metric-icon.red {
    background: linear-gradient(135deg, #30cfd0 0%, #330867 100%);
}

.metric-info h3 {
    font-size: 28px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.metric-info p {
    font-size: 14px;
    color: #718096;
    margin-top: 4px;
}

/* Dashboard Row */
.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.chart-card, .activity-card {
    min-height: 300px;
}

/* Loyalty Chart */
.tier-bar {
    margin-bottom: 20px;
}

.tier-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.tier-name {
    font-weight: 600;
    font-size: 14px;
}

.tier-name.silver {
    color: #718096;
}

.tier-name.gold {
    color: #d69e2e;
}

.tier-name.platinum {
    color: #805ad5;
}

.tier-count {
    color: #4a5568;
    font-weight: 600;
}

.tier-progress {
    height: 24px;
    background-color: #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
}

.tier-fill {
    height: 100%;
    transition: width 0.5s ease;
}

.tier-fill.silver {
    background: linear-gradient(90deg, #718096, #a0aec0);
}

.tier-fill.gold {
    background: linear-gradient(90deg, #d69e2e, #ecc94b);
}

.tier-fill.platinum {
    background: linear-gradient(90deg, #805ad5, #9f7aea);
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background-color: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
}

.activity-icon.topup {
    background-color: #48bb78;
}

.activity-icon.deduction {
    background-color: #f56565;
}

.activity-icon.booking {
    background-color: #4299e1;
}

.activity-details {
    flex: 1;
}

.activity-details p {
    margin: 0;
    font-size: 14px;
    color: #2d3748;
}

.activity-details small {
    color: #718096;
    font-size: 12px;
}

.activity-amount {
    font-weight: 600;
    font-size: 15px;
}

.activity-amount.positive {
    color: #48bb78;
}

.activity-amount.negative {
    color: #f56565;
}

/* Table Styles */
.card-header {
    margin-bottom: 20px;
}

.search-filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 250px;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: #667eea;
}

.filter-select {
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background-color: #f7fafc;
}

.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #4a5568;
    border-bottom: 2px solid #e2e8f0;
}

.data-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
    color: #2d3748;
}

.data-table tbody tr:hover {
    background-color: #f7fafc;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.badge.success {
    background-color: #c6f6d5;
    color: #22543d;
}

.badge.warning {
    background-color: #feebc8;
    color: #744210;
}

.badge.danger {
    background-color: #fed7d7;
    color: #742a2a;
}

.badge.info {
    background-color: #bee3f8;
    color: #2c5282;
}

.badge.vip {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: #744210;
}

.badge.corporate {
    background-color: #e0e7ff;
    color: #3730a3;
}

.badge.regular {
    background-color: #e2e8f0;
    color: #2d3748;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #2d3748;
}

.btn-secondary:hover {
    background-color: #cbd5e0;
}

.btn-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

.btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Wallet Styles */
.wallet-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.wallet-stat {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background-color: #f7fafc;
    border-radius: 8px;
}

.wallet-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.wallet-stat-info h4 {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin: 0;
}

.wallet-stat-info p {
    font-size: 13px;
    color: #718096;
    margin: 4px 0 0 0;
}

/* Notifications */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.notification-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background-color: #fff5f5;
    border-left: 4px solid #fc8181;
    border-radius: 8px;
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-content i {
    color: #f56565;
    font-size: 20px;
}

.notification-content p {
    margin: 0;
    color: #2d3748;
    font-size: 14px;
}

/* Billing Summary */
.billing-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.billing-stat {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: white;
    text-align: center;
}

.billing-stat h4 {
    font-size: 28px;
    margin: 0 0 8px 0;
}

.billing-stat p {
    font-size: 14px;
    opacity: 0.9;
    margin: 0;
}

/* Loyalty Cards */
.loyalty-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.loyalty-card {
    text-align: center;
    padding: 32px 24px;
    position: relative;
    overflow: hidden;
}

.loyalty-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
}

.silver-card::before {
    background: linear-gradient(90deg, #718096, #a0aec0);
}

.gold-card::before {
    background: linear-gradient(90deg, #d69e2e, #ecc94b);
}

.platinum-card::before {
    background: linear-gradient(90deg, #805ad5, #9f7aea);
}

.loyalty-badge {
    width: 80px;
    height: 80px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
}

.silver-card .loyalty-badge {
    background: linear-gradient(135deg, #718096, #a0aec0);
    color: white;
}

.gold-card .loyalty-badge {
    background: linear-gradient(135deg, #d69e2e, #ecc94b);
    color: white;
}

.platinum-card .loyalty-badge {
    background: linear-gradient(135deg, #805ad5, #9f7aea);
    color: white;
}

.loyalty-card h3 {
    font-size: 22px;
    margin-bottom: 8px;
}

.loyalty-card > p {
    color: #718096;
    margin-bottom: 20px;
}

.benefits-list {
    list-style: none;
    text-align: left;
}

.benefits-list li {
    padding: 8px 0;
    color: #4a5568;
    font-size: 14px;
}

.benefits-list i {
    color: #48bb78;
    margin-right: 8px;
}

/* Member Progress */
.member-progress-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background-color: #f7fafc;
    border-radius: 8px;
    margin-bottom: 12px;
}

.member-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 600;
}

.member-details {
    flex: 1;
}

.member-details h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
}

.member-details p {
    margin: 0;
    font-size: 13px;
    color: #718096;
}

.progress-container {
    margin-top: 8px;
}

.progress-bar {
    height: 8px;
    background-color: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea, #764ba2);
    transition: width 0.5s ease;
}

.progress-container p {
    font-size: 12px;
    color: #718096;
    margin: 0;
}

/* Marketing Templates */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.template-card {
    padding: 24px;
    background-color: #f7fafc;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.template-card:hover {
    background-color: #e2e8f0;
    transform: translateY(-4px);
}

.template-card i {
    font-size: 36px;
    color: #667eea;
    margin-bottom: 12px;
}

.template-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
    color: #2d3748;
}

.template-card p {
    font-size: 13px;
    color: #718096;
    margin: 0;
}

/* Preview Tabs */
.preview-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.tab-btn {
    padding: 10px 20px;
    border: 1px solid #e2e8f0;
    background-color: white;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.tab-btn:hover {
    background-color: #f7fafc;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.preview-content {
    padding: 20px;
    background-color: #f7fafc;
    border-radius: 0 8px 8px 8px;
    min-height: 200px;
}

.message-preview {
    background-color: white;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.message-preview h4 {
    margin-bottom: 12px;
    color: #2d3748;
}

.message-preview p {
    color: #4a5568;
    line-height: 1.6;
    margin: 8px 0;
}

/* eZee Integration */
.sync-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.sync-notification {
    padding: 16px;
    background-color: #c6f6d5;
    border-left: 4px solid #48bb78;
    border-radius: 8px;
    margin-top: 16px;
}

.sync-notification.error {
    background-color: #fed7d7;
    border-left-color: #f56565;
}

.sync-notification p {
    margin: 0;
    color: #2d3748;
    font-size: 14px;
}

/* Staff Management */
.role-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.role-btn {
    padding: 24px;
    background-color: #f7fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.role-btn:hover {
    border-color: #667eea;
    background-color: #edf2f7;
}

.role-btn.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
}

.role-btn i {
    font-size: 32px;
    color: #667eea;
}

.role-btn span {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-content.large {
    max-width: 900px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #e2e8f0;
}

.modal-header h2 {
    font-size: 20px;
    color: #2d3748;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: #718096;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 30px;
    height: 30px;
}

.close-btn:hover {
    color: #2d3748;
}

.modal-body {
    padding: 24px;
}

/* Profile Sections */
.profile-section {
    margin-bottom: 24px;
}

.profile-section h3 {
    font-size: 16px;
    margin-bottom: 16px;
    color: #2d3748;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.profile-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-item label {
    font-size: 12px;
    color: #718096;
    font-weight: 600;
}

.profile-item span {
    font-size: 14px;
    color: #2d3748;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.history-item {
    padding: 12px;
    background-color: #f7fafc;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.history-item p {
    margin: 0;
    font-size: 14px;
    color: #2d3748;
}

.history-item small {
    font-size: 12px;
    color: #718096;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #2d3748;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

/* Booking Details */
.booking-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.detail-item label {
    font-size: 12px;
    color: #718096;
    font-weight: 600;
}

.detail-item span {
    font-size: 14px;
    color: #2d3748;
    font-weight: 500;
}

.charge-section,
.checkout-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
}

.charge-section h3,
.checkout-summary h3 {
    font-size: 16px;
    margin-bottom: 16px;
}

.charge-item {
    display: flex;
    justify-content: space-between;
    padding: 12px;
    background-color: #f7fafc;
    border-radius: 8px;
    margin-bottom: 8px;
}

.charge-item span {
    font-size: 14px;
    color: #2d3748;
}

.charge-item .amount {
    font-weight: 600;
    color: #667eea;
}

.checkout-summary {
    margin-top: 24px;
    padding: 20px;
    background-color: #f7fafc;
    border-radius: 8px;
}

.summary-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #2d3748;
}

.summary-row.total {
    padding-top: 12px;
    border-top: 2px solid #e2e8f0;
    font-size: 16px;
    font-weight: 700;
    color: #667eea;
}

/* Utility Classes */
.text-success {
    color: #48bb78;
}

.text-danger {
    color: #f56565;
}

.text-warning {
    color: #ed8936;
}

.text-info {
    color: #4299e1;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .dashboard-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        padding: 20px 10px;
    }

    .logo h2,
    .nav-item span {
        display: none;
    }

    .logo {
        justify-content: center;
    }

    .main-content {
        margin-left: 70px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .profile-grid,
    .booking-details-grid {
        grid-template-columns: 1fr;
    }

    .top-header h1 {
        font-size: 18px;
    }

    .screen {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .modal-content {
        width: 95%;
    }

    .search-filter {
        flex-direction: column;
    }

    .search-input {
        min-width: 100%;
    }
}
