/* POS System Custom Styles */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #f8f9fa;
    --dark-bg: #2c3e50;
    --sidebar-width: 250px;
    --header-height: 80px;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
    color: #333;
}

/* Sidebar Styles */
.sidebar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #34495e 100%);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    z-index: 1000;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
}

.logo-section {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.logo i {
    font-size: 2rem;
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

/* Navigation Styles */
.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav .nav {
    padding: 0;
}

.sidebar-nav .nav-item {
    margin: 0.2rem 0;
}

.sidebar-nav .nav-link {
    color: rgba(255,255,255,0.8);
    padding: 1rem 1.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
    color: white;
    background-color: rgba(255,255,255,0.1);
    border-left-color: var(--secondary-color);
    transform: translateX(5px);
}

.sidebar-nav .nav-link.active {
    color: white;
    background-color: rgba(52, 152, 219, 0.2);
    border-left-color: var(--secondary-color);
}

.sidebar-nav .nav-link i {
    font-size: 1.2rem;
    margin-right: 1rem;
    width: 20px;
    text-align: center;
}

/* Main Content Area */
.col-md-9, .col-lg-10 {
    margin-left: var(--sidebar-width);
    padding: 0;
}

/* Header Styles */
.main-header {
    background: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 999;
}

.page-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.page-subtitle {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

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

.notification-icon {
    position: relative;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.notification-icon:hover {
    color: var(--secondary-color);
}

.notification-icon .badge {
    position: absolute;
    top: -8px;
    right: -8px;
    font-size: 0.7rem;
    padding: 0.3rem 0.5rem;
}

.user-profile {
    display: flex;
    align-items: center;
    margin-left: 1rem;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 0.5rem;
    border: 2px solid var(--secondary-color);
}

.user-name {
    font-weight: 500;
    color: var(--primary-color);
}

/* Main Content */
.main-content {
    padding: 2rem;
    min-height: calc(100vh - var(--header-height));
}

/* Page Content */
.page-content {
    display: none;
}

.page-content.active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    font-size: 1.5rem;
    color: white;
}

.stat-card:nth-child(1) .stat-icon {
    background: linear-gradient(135deg, var(--success-color), #2ecc71);
}

.stat-card:nth-child(2) .stat-icon {
    background: linear-gradient(135deg, var(--secondary-color), #5dade2);
}

.stat-card:nth-child(3) .stat-icon {
    background: linear-gradient(135deg, var(--warning-color), #f7dc6f);
}

.stat-card:nth-child(4) .stat-icon {
    background: linear-gradient(135deg, var(--danger-color), #ec7063);
}

.stat-info h3 {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 0.2rem;
}

.stat-info p {
    color: #666;
    margin: 0;
    font-size: 0.9rem;
}

/* Cards */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
}

.card-body {
    padding: 1.5rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    border-top: none;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: var(--primary-color);
    padding: 1rem 0.75rem;
}

.table td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.table-hover tbody tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: linear-gradient(135deg, var(--secondary-color), #5dade2);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #2ecc71);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8, #5bc0de);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #f7dc6f);
    color: #333;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #ec7063);
}

/* Badges */
.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 10px;
    padding: 1.5rem;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .col-md-9, .col-lg-10 {
        margin-left: 0;
    }
    
    .main-header {
        padding: 1rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .stat-card {
        margin-bottom: 1rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
}

/* Iframe Styles */
#recharge-iframe {
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #2980b9;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--secondary-color), #5dade2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--secondary-color), #5dade2) 1;
}
