/* Custom styles to complement the maintheme.css */

/* Login Page */
.login-page {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h2 {
    color: #2d3748;
    margin-bottom: 10px;
}

.login-header p {
    color: #718096;
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 5px;
    color: #4a5568;
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: #4299e1;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: #4299e1;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-login:hover {
    background: #3182ce;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    color: #a0aec0;
    font-size: 12px;
}

/* Dashboard */
.dashboard {
    padding: 20px;
}

.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-header h1 {
    color: #2d3748;
    margin-bottom: 5px;
}

.dashboard-header p {
    color: #718096;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    color: white;
    font-size: 24px;
}

.stat-info h3 {
    font-size: 24px;
    color: #2d3748;
    margin: 0;
}

.stat-info p {
    color: #718096;
    margin: 5px 0 0 0;
}

.dashboard-sections {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.section {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.section-header {
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h3 {
    margin: 0;
    color: #2d3748;
}

.btn-view-all {
    color: #4299e1;
    text-decoration: none;
    font-size: 14px;
}

.section-content {
    padding: 20px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.data-table th {
    background: #f7fafc;
    color: #4a5568;
    font-weight: 600;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.badge-danger {
    background: #fed7d7;
    color: #c53030;
}

.badge-warning {
    background: #feebc8;
    color: #c05621;
}

.text-danger {
    color: #c53030;
    font-weight: 600;
}

.text-warning {
    color: #c05621;
    font-weight: 600;
}

.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.quick-action {
    background: #f7fafc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: #4a5568;
    transition: all 0.3s;
}

.quick-action:hover {
    background: #edf2f7;
    transform: translateY(-2px);
}

.quick-action i {
    font-size: 24px;
    margin-bottom: 10px;
    color: #4299e1;
}

.quick-action span {
    display: block;
    font-weight: 500;
}

/* Sale Page */
.sale-page {
    padding: 20px;
}

.sale-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    height: calc(100vh - 100px);
}

.sale-products {
    background: white;
    border-radius: 10px;
    padding: 20px;
    overflow-y: auto;
}

.search-section {
    display: flex;
    margin-bottom: 20px;
}

.search-input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 5px 0 0 5px;
    font-size: 16px;
}

.btn-search {
    background: #4299e1;
    color: white;
    border: none;
    padding: 0 20px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.product-card {
    background: #f7fafc;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s;
}

.product-card:hover {
    border-color: #4299e1;
    box-shadow: 0 2px 10px rgba(66, 153, 225, 0.1);
}

.product-info h4 {
    margin: 0 0 5px 0;
    color: #2d3748;
    font-size: 14px;
}

.product-info p {
    margin: 0 0 10px 0;
    color: #718096;
    font-size: 12px;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price {
    color: #2d3748;
    font-weight: 600;
}

.stock {
    color: #718096;
    font-size: 12px;
}

.btn-add {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    background: #48bb78;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.btn-add:hover {
    background: #38a169;
}

.sale-cart {
    background: white;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.cart-header h3 {
    margin: 0;
    color: #2d3748;
}

.btn-clear {
    background: #fc8181;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
}

.empty-cart {
    text-align: center;
    color: #a0aec0;
    padding: 40px 0;
}

.empty-cart i {
    font-size: 48px;
    margin-bottom: 10px;
}

.cart-item {
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.item-info h5 {
    margin: 0 0 5px 0;
    color: #2d3748;
    font-size: 14px;
}

.item-price {
    color: #718096;
    font-size: 12px;
    margin: 0;
}

.item-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.btn-qty {
    width: 30px;
    height: 30px;
    border: 1px solid #e2e8f0;
    background: white;
    border-radius: 4px;
    cursor: pointer;
}

.qty-input {
    width: 50px;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 5px;
}

.item-total {
    margin-left: auto;
    font-weight: 600;
    color: #2d3748;
}

.btn-remove {
    background: #fc8181;
    color: white;
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
}

.cart-summary {
    background: #f7fafc;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #4a5568;
}

.summary-row.total {
    border-top: 1px solid #e2e8f0;
    padding-top: 10px;
    margin-top: 10px;
    font-weight: 600;
    color: #2d3748;
    font-size: 18px;
}

.discount-input {
    display: flex;
    gap: 10px;
}

.discount-input input {
    width: 80px;
    padding: 5px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.discount-input select {
    padding: 5px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    background: white;
}

.customer-section,
.payment-section {
    margin-bottom: 20px;
}

.customer-section h4,
.payment-section h4 {
    margin: 0 0 10px 0;
    color: #2d3748;
}

.customer-section input {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.payment-methods {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.payment-option {
    flex: 1;
    text-align: center;
    padding: 10px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
}

.payment-option input[type="radio"] {
    display: none;
}

.payment-option input[type="radio"]:checked + i {
    color: #4299e1;
}

.payment-option input[type="radio"]:checked ~ i {
    color: #4299e1;
}

.payment-option i {
    display: block;
    font-size: 24px;
    margin-bottom: 5px;
    color: #a0aec0;
}

#mpesa-details,
#cash-details {
    margin-top: 10px;
}

.hidden {
    display: none;
}

.cash-input,
.change-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cash-input input {
    width: 150px;
    padding: 8px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
}

.change-display span {
    font-weight: 600;
    color: #2d3748;
}

.action-buttons {
    display: flex;
    gap: 10px;
    margin-top: auto;
}

.btn-hold,
.btn-complete {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
}

.btn-hold {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-complete {
    background: #48bb78;
    color: white;
}

.btn-complete:hover {
    background: #38a169;
}

/* Responsive */
@media (max-width: 1024px) {
    .sale-container {
        grid-template-columns: 1fr;
        height: auto;
    }

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

/* Alert Messages */
.alert {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-danger {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #fc8181;
}

.alert-success {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}