/* ========================================
   Modern POS System CSS - Enhanced Version
   ======================================== */

/* Reset and Base Styles */


/* Container with Advanced Glassmorphism */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 30px;
    box-shadow: 
        0 30px 60px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255, 255, 255, 0.3) inset;
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.container::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
    pointer-events: none;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Enhanced Header */
h2 {
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 50px;
    text-transform: uppercase;
    letter-spacing: 3px;
    position: relative;
    z-index: 1;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

h2::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 5px;
    background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.4);
}

/* Form Groups with Better Spacing */
.form-group {
    margin-bottom: 30px;
    position: relative;
    z-index: 1;
}

.form-group label {
    font-weight: 700;
    color: #34495e;
    margin-bottom: 10px;
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Enhanced Form Controls */
.form-control {
    border: 2px solid #e1e8ed;
    border-radius: 15px;
    padding: 16px 20px;
    font-size: 16px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    width: 100%;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.06),
        0 0 0 0 rgba(102, 126, 234, 0);
    font-family: inherit;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 
        0 4px 12px rgba(102, 126, 234, 0.2),
        0 0 0 4px rgba(102, 126, 234, 0.1);
    outline: none;
    background: #ffffff;
    transform: translateY(-2px);
}

.form-control:hover:not([readonly]) {
    border-color: #a8b3cf;
    transform: translateY(-1px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.08);
}

.form-control[readonly] {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: #ced4da;
    color: #495057;
    font-weight: 700;
    cursor: not-allowed;
}

/* Input Groups with Seamless Design */
.input-group {
    position: relative;
    display: flex;
    align-items: stretch;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 15px;
    overflow: hidden;
}

.input-group .form-control {
    border-radius: 15px 0 0 15px;
    border-right: none;
    box-shadow: none;
}

.input-group-append .btn {
    border-radius: 0 15px 15px 0;
    border-left: none;
    padding: 16px 30px;
}

/* Premium Button Styles */
.btn {
    padding: 14px 30px;
    border-radius: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: inline-block;
    font-size: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.5);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(102, 126, 234, 0.6);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 6px 25px rgba(56, 239, 125, 0.4);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(56, 239, 125, 0.6);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    color: white;
    box-shadow: 0 6px 25px rgba(238, 9, 121, 0.4);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(238, 9, 121, 0.6);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #434343 0%, #000000 100%);
    color: white;
    box-shadow: 0 6px 25px rgba(67, 67, 67, 0.4);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(67, 67, 67, 0.6);
    color: white;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 12px;
}

.btn.mt-2, .btn.mt-3 {
    margin-top: 15px;
}

/* Modern Table Design */
.table {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    margin-bottom: 30px;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.table thead th {
    padding: 20px 18px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border: none;
    font-size: 13px;
    text-align: center;
    vertical-align: middle;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.table tbody td {
    padding: 18px;
    vertical-align: middle;
    border-top: 1px solid #f1f3f5;
    font-size: 15px;
    text-align: center;
    font-weight: 500;
}

.table tbody tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.table tbody tr:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
    transform: scale(1.01);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.15);
}

.table tbody tr:nth-child(even) {
    background: #fafbfc;
}

.table tbody tr:nth-child(even):hover {
    background: linear-gradient(135deg, #f0f7ff 0%, #e0efff 100%);
}

/* Product List Animation */
#productList tbody tr {
    animation: slideInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Product Search Suggestions */
.product-search {
    position: relative;
}

.product-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid #e1e8ed;
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.product-suggestion {
    padding: 15px;
    cursor: pointer;
    border-bottom: 1px solid #f1f3f5;
    transition: all 0.3s ease;
}

.product-suggestion:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
    transform: translateX(5px);
}

.product-suggestion:last-child {
    border-bottom: none;
}

.product-suggestion strong {
    color: #667eea;
    font-size: 16px;
}

.product-suggestion small {
    color: #6c757d;
    font-size: 13px;
}

/* Guest Info Section */
#guest-info {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 30px;
    border-radius: 20px;
    margin-bottom: 30px;
    border: 3px solid rgba(252, 182, 159, 0.4);
    box-shadow: 0 10px 30px rgba(252, 182, 159, 0.4);
}

#guest-info label {
    color: #8b4513;
    font-weight: 800;
}

/* Calculation Section with Premium Design */
.row .col-md-6 {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

/* Quantity Input Enhanced */
input[type="number"][name="quantity[]"] {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border: 3px solid #2196f3;
    border-radius: 12px;
    text-align: center;
    font-weight: 800;
    color: #0d47a1;
    width: 90px;
    padding: 8px;
    font-size: 16px;
}

/* Price Display Enhanced */
.table tbody td:nth-child(4) {
    color: #27ae60;
    font-weight: 800;
    font-size: 17px;
}

.table tbody td.total {
    color: #e74c3c;
    font-weight: 900;
    font-size: 18px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Submit Button Premium Design */
button[name="createSale"] {
    background: linear-gradient(135deg, #00b894 0%, #00cec9 50%, #00b894 100%);
    background-size: 200% 100%;
    color: white;
    padding: 20px 50px;
    font-size: 18px;
    font-weight: 800;
    border-radius: 20px;
    border: none;
    box-shadow: 0 8px 30px rgba(0, 184, 148, 0.5);
    transition: all 0.5s ease;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    width: 100%;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

button[name="createSale"]:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 40px rgba(0, 184, 148, 0.7);
    background-position: 100% 0;
}

button[name="createSale"]::after {
    content: '→';
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 24px;
    transition: all 0.3s ease;
}

button[name="createSale"]:hover::after {
    right: 20px;
}

/* Select Enhancement with Modern Arrow */
select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 20px center;
    background-size: 16px;
    padding-right: 50px;
    appearance: none;
}

/* Responsive Design */
@media (max-width: 992px) {
    .container {
        padding: 30px;
    }
    
    h2 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    body {
        padding: 15px 10px;
    }
    
    .container {
        margin: 0;
        padding: 25px;
        border-radius: 20px;
    }
    
    h2 {
        font-size: 2rem;
        margin-bottom: 35px;
    }
    
    .table {
        font-size: 13px;
    }
    
    .table thead th,
    .table tbody td {
        padding: 12px 8px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 13px;
    }
    
    .row .col-md-6 {
        margin-bottom: 20px;
        padding: 25px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 20px;
        border-radius: 15px;
    }
    
    h2 {
        font-size: 1.75rem;
        margin-bottom: 30px;
    }
    
    .form-group {
        margin-bottom: 25px;
    }
    
    button[name="createSale"] {
        padding: 18px 30px;
        font-size: 16px;
    }
}

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

::-webkit-scrollbar-track {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    border: 2px solid #f5f7fa;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #764ba2 0%, #f093fb 100%);
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 4px solid rgba(102, 126, 234, 0.2);
    border-radius: 50%;
    border-top-color: #667eea;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Alert Styles */
.alert {
    padding: 18px 24px;
    margin-bottom: 25px;
    border: none;
    border-radius: 15px;
    font-weight: 700;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.alert-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, #ee0979 0%, #ff6a00 100%);
    color: white;
}

/* Focus States */
*:focus {
    outline: none;
}

/* Print Media */
@media print {
    body {
        background: white;
    }
    
    .container {
        box-shadow: none;
        background: white;
        border: none;
    }
    
    .container::before {
        display: none;
    }
    
    .btn {
        display: none;
    }
    
    h2 {
        color: #2c3e50;
        -webkit-text-fill-color: #2c3e50;
    }
}