/* Modern Style for Mobile Shop Management System */

:root {
    --primary: #4361ee;
    --primary-light: #4895ef;
    --secondary: #3f37c9;
    --success: #4caf50;
    --info: #4cc9f0;
    --warning: #f72585;
    --danger: #e63946;
    --dark: #1d3557;
    --gray: #6c757d;
    --gray-light: #f1faee;
    --light: #ffffff;
    --radius: 8px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* General Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--dark);
    line-height: 1.6;
    min-height: 100vh;
    background-image: url('images/bg-pattern.svg');
    background-attachment: fixed;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header Styles */
.header {
    background-color: var(--light);
    box-shadow: var(--shadow);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo img {
    height: 40px;
}

.logo span {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    color: var(--gray);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
    border-radius: 2px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Dashboard Styles */
.dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.dashboard-card {
    background-color: var(--light);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.dashboard-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary);
}

.dashboard-card.info::before {
    background-color: var(--info);
}

.dashboard-card.success::before {
    background-color: var(--success);
}

.dashboard-card.alert::before {
    background-color: var(--warning);
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.dashboard-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray);
}

.dashboard-card-icon {
    width: 40px;
    height: 40px;
}

.dashboard-card-value {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.dashboard-card-description {
    color: var(--gray);
    font-size: 0.9rem;
}

/* Table Styles */
.table-container {
    background-color: var(--light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow-x: auto; /* Add this line to enable horizontal scrolling */
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
}

.table-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark);
    margin: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: var(--gray-light);
}

th {
    text-align: left;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--dark);
}

td {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--gray-light);
}

tr:hover {
    background-color: rgba(241, 250, 238, 0.5);
}

/* Button Styles */
.btn {
    display: inline-block;
    font-weight: 500;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
}

.btn-primary {
    color: var(--light);
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

.btn-outline {
    color: var(--primary);
    background-color: transparent;
    border-color: var(--primary);
}

.btn-outline:hover {
    color: var(--light);
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.action-buttons form {
    display: inline-block;
    margin: 0;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: calc(var(--radius) - 2px);
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
}

/* Form Styles */
.form-container {
    background-color: var(--light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
    overflow: hidden;
}

.form-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-light);
}

form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: var(--dark);
    background-color: var(--light);
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: var(--radius);
    transition: var(--transition);
}

.form-control:focus {
    color: var(--dark);
    background-color: var(--light);
    border-color: var(--primary-light);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(67, 97, 238, 0.25);
}

/* Login Styles */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 2rem;
    background-image: url('images/login-hero.svg');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background-color: var(--light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.login-logo img {
    height: 60px;
}

.login-title {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary);
    font-weight: 600;
}

/* Alert Styles */
.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: var(--radius);
    border-left: 4px solid transparent;
}

.alert-success {
    background-color: rgba(76, 175, 80, 0.1);
    border-left-color: var(--success);
    color: var(--success);
}

.alert-danger {
    background-color: rgba(230, 57, 70, 0.1);
    border-left-color: var(--danger);
    color: var(--danger);
}

/* Low Stock Items */
.low-stock-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background-color: rgba(247, 37, 133, 0.05);
    border-radius: var(--radius);
}

.product-info {
    display: flex;
    flex-direction: column;
}

.product-name {
    font-weight: 500;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .user-info {
        width: 100%;
        justify-content: center;
    }
    
    .dashboard {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .table-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}

/* Payment Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-completed {
    background-color: rgba(76, 175, 80, 0.1);
    color: var(--success);
}

.status-pending {
    background-color: rgba(255, 193, 7, 0.1);
    color: #ffc107;
}

.status-failed {
    background-color: rgba(230, 57, 70, 0.1);
    color: var(--danger);
}
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background-color: rgba(6, 214, 160, 0.2);
    color: var(--success);
}

.badge-info {
    background-color: rgba(17, 138, 178, 0.2);
    color: var(--primary);
}

.search-container {
    display: flex;
    gap: 10px;
}

.search-results {
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: none;
}

.search-result-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

.search-result-item:last-child {
    border-bottom: none;
}

.no-results {
    padding: 10px;
    color: #666;
    text-align: center;
    font-style: italic;
}