/* AYS Order Tracking System Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 10px;
}

.logo-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #8B4513, #D2691E);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    font-weight: bold;
    margin-bottom: 10px;
}



.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.user-info span {
    font-weight: 500;
    color: #666;
}

/* Main Content */
.main-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.main-content h2 {
    color: #8B4513;
    margin-bottom: 20px;
    text-align: center;
    font-size: 24px;
}

.main-content h3 {
    color: #666;
    margin-bottom: 15px;
    font-size: 18px;
}

/* Login Styles */
.login-container {
    max-width: 500px;
    margin: 100px auto;
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    text-align: center;
}

.login-form h3 {
    margin-bottom: 30px;
    color: #8B4513;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #8B4513;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.password-help {
    font-style: italic;
    margin-top: 8px;
}

.login-info {
    margin-top: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
    text-align: left;
}

.login-info p {
    margin-bottom: 8px;
    color: #666;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #8B4513;
    color: white;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background: #A0522D;
}

.btn-primary {
    background: #8B4513;
}

.btn-primary:hover {
    background: #A0522D;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-success {
    background: #28a745;
}

.btn-success:hover {
    background: #218838;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

/* Create Order Section */
.create-order-section {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: #f9f9f9;
    border-radius: 8px;
}

.create-order-section p {
    margin-bottom: 20px;
    color: #666;
    font-size: 18px;
}

/* Orders Section */
.orders-section {
    margin-top: 40px;
}

.orders-table-section {
    margin-bottom: 40px;
}

.table-header {
    background: #333;
    color: white;
    padding: 15px 20px;
    border-radius: 6px 6px 0 0;
    font-weight: 500;
}

.orders-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.orders-table th,
.orders-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.orders-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.orders-table tr:hover {
    background: #f8f9fa;
}

.date-link {
    color: #007bff;
    text-decoration: none;
    font-weight: 500;
}

.date-link:hover {
    text-decoration: underline;
}

/* Order Form Styles */
.order-form {
    margin-top: 20px;
}

.order-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.order-table th,
.order-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.order-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.count-input {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.notes-input {
    width: 200px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.location-name {
    font-weight: 500;
    color: #555;
}

.count {
    text-align: center;
    font-weight: 500;
}

.notes {
    color: #666;
    font-style: italic;
}

.has-notes {
    background: #fff3cd;
}

.totals-row {
    background: #f8f9fa;
    font-weight: 600;
}

.totals-row td {
    border-top: 2px solid #dee2e6;
}

/* View Only Table */
.order-table.view-only .count {
    text-align: center;
    font-weight: 500;
}

/* Order Header */
.order-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #eee;
}

.order-meta {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    font-size: 14px;
    color: #666;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.order-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* Messages */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}

.info-message {
    background: #d1ecf1;
    color: #0c5460;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #bee5eb;
}

/* Account Manager Styles */
.account-form {
    background: #f9f9f9;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.account-form h3 {
    margin-bottom: 20px;
    color: #8B4513;
}

.form-description {
    color: #666;
    margin-bottom: 20px;
    font-style: italic;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 4px;
    border-left: 3px solid #8B4513;
}

.account-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.account-info h3 {
    margin-bottom: 15px;
    color: #8B4513;
}

.account-info p {
    margin-bottom: 8px;
    color: #555;
}

/* Date Selection Form */
.date-selection-form {
    max-width: 400px;
    margin: 0 auto;
}

/* Print Styles */
@media print {
    .header {
        display: block !important;
        text-align: center;
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
    
    .logo {
        display: block !important;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .logo img {
        width: 80px;
        height: 80px;
        margin: 0 auto 10px auto;
        display: block;
    }
    
    .user-info {
        display: none !important;
    }
    
    .btn {
        display: none !important;
    }
    
    .order-actions, .form-actions {
        display: none !important;
    }
    
    .main-content {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .order-table {
        page-break-inside: auto;
    }
    
    .order-table tr {
        page-break-inside: avoid;
        page-break-after: auto;
    }
    
    .order-header {
        page-break-inside: avoid;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .order-table {
        font-size: 14px;
    }
    
    .order-table th,
    .order-table td {
        padding: 8px 6px;
    }
    
    .count-input,
    .notes-input {
        width: 100%;
        max-width: 80px;
    }
    
    .form-actions,
    .order-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .order-meta {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .login-container {
        margin: 50px 20px;
        padding: 30px 20px;
    }
    
    .logo-icon {
        width: 50px;
        height: 50px;
        font-size: 28px;
    }
    

}
