/* Sales Record Styles */
@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Poppins:wght@300;400;500;600;700&display=swap');

/* General Body & Container */
.sales-record-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    font-family: 'Poppins', sans-serif;
    color: #333;
}

.sales-record-container h1,
.sales-record-container h2 {
    font-family: 'Bebas Neue', cursive;
    letter-spacing: 1px;
}

.sales-record-container h1 {
    font-size: 3rem;
    color: #003049;
    text-align: center;
    margin-bottom: 2rem;
    text-transform: uppercase;
}

.sales-record-container h2 {
    font-size: 2rem;
    color: #003049;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #fcbf49;
    padding-bottom: 0.5rem;
}

/* Form Styles */
.sr-form-section {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #003049;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: all 0.2s ease-in-out;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #f77f00;
    box-shadow: 0 0 0 2px rgba(247, 127, 0, 0.2);
}

.gift-option {
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}

.gift-option input {
    margin-right: 0.5rem;
}

/* Filters Section */
.sr-filters-section {
    background: #fff;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    align-items: end;
}
.filter-grid .form-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

/* ======================================= */
/* CREATIVE BUTTON STYLES START            */
/* ======================================= */

/* --- Base Style for All Buttons --- */
.sr-submit-btn, .sr-cancel-btn, .sr-filter-btn, .sr-button-secondary, 
.sr-export-btn-small, .records-controls .search-form button, .pagination-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    padding: 0.6rem 1.2rem;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.sr-submit-btn:hover, .sr-cancel-btn:hover, .sr-filter-btn:hover, .sr-button-secondary:hover, 
.sr-export-btn-small:hover, .records-controls .search-form button:hover, .pagination-btn:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
    transform: translateY(-3px);
}

/* --- Primary Actions (Orange -> Red) --- */
.sr-submit-btn, .sr-filter-btn {
    background-color: #f77f00;
}
.sr-submit-btn:hover, .sr-filter-btn:hover {
    background-color: #d62828;
}

/* --- Secondary Actions (Dark Blue -> Gold Accent) --- */
.sr-cancel-btn, .sr-button-secondary, .records-controls .search-form button, .pagination-btn {
    background-color: #003049;
}

.sr-cancel-btn::after, .sr-button-secondary::after, 
.records-controls .search-form button::after, .pagination-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #fcbf49;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease-in-out;
}

.sr-cancel-btn:hover::after, .sr-button-secondary:hover::after, 
.records-controls .search-form button:hover::after, .pagination-btn:hover::after {
    transform: scaleX(1);
}

/* --- Special Action (Export: Gold -> Orange) --- */
.sr-export-btn-small {
    background-color: #fcbf49;
    color: #003049;
}

.sr-export-btn-small:hover {
    background-color: #f77f00;
    color: white;
}

/* --- Pagination Disabled State --- */
.pagination-btn.disabled {
    background: #ccc;
    pointer-events: none;
    cursor: default;
    box-shadow: none;
    transform: none;
}
.pagination-btn.disabled::after {
    display: none;
}

/* ======================================= */
/* CREATIVE BUTTON STYLES END              */
/* ======================================= */


/* Summary Section */
.sr-summary-section, .sr-product-breakdown {
    margin-bottom: 2rem;
}

.summary-cards, .product-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.summary-card, .product-card {
    background: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.summary-card:hover, .product-card:hover {
    transform: translateY(-5px);
}

.summary-card h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #003049;
    font-weight: 600;
}

.summary-card .amount {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}
.summary-card .amount.positive { color: #2ecc71; }
.summary-card .amount.negative { color: #d62828; }

.product-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: #003049;
    font-weight: 600;
    border-bottom: 1px solid #fcbf49;
    padding-bottom: 0.5rem;
}
.product-card p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

/* Records Table Section */
.sr-records-section {
    margin-bottom: 2rem;
}

.records-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}
.records-header h2 {
    margin-bottom: 0;
    border-bottom: none;
}
.records-controls {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.records-controls .search-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#searchInput {
    padding: 0.5rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
#searchInput:focus {
    outline: none;
    border-color: #f77f00;
    box-shadow: 0 0 0 2px rgba(247, 127, 0, 0.2);
}


.records-table-container {
    overflow-x: auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.records-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.records-table th {
    background: #003049;
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
}

.records-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

.records-table .toggle-column {
    display: none;
}
.records-table-container.show-all-columns .records-table .toggle-column {
    display: table-cell;
}

.records-table tr:last-child td {
    border-bottom: none;
}
.records-table tr:hover {
    background: #f9f9f9;
}

.type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.type-badge.sale {
    background: rgba(46, 204, 113, 0.2);
    color: #27ae60;
}
.type-badge.expense {
    background: rgba(231, 76, 60, 0.2);
    color: #c0392b;
}

.actions { display: flex; gap: 0.5rem; align-items: center; }

/* Table Action Buttons */
.edit-btn {
    color: #003049;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}
.edit-btn:hover {
    color: #f77f00;
    text-decoration: underline;
}
.delete-form { display: inline; margin: 0; }
.delete-btn {
    background: #d62828;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s ease;
}
.delete-btn:hover {
    background: #a30000;
    transform: scale(1.1);
}

.no-data {
    text-align: center;
    padding: 2rem;
    color: #7f8c8d;
    font-style: italic;
}

/* ===== Notification Styles ===== */
.sr-notification {
    padding: 12px 18px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-weight: 600;
    text-align: center;
}
.sr-notification.success {
    background: #d1f7d6;
    color: #1a7a1a;
    border: 1px solid #6fdc70;
}
.sr-notification.error {
    background: #ffd8d8;
    color: #a30000;
    border: 1px solid #ff5c5c;
}

/* ============================ */
/* PAGINATION STYLES            */
/* ============================ */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
}

.page-info {
    font-weight: 500;
    color: #333;
}
.jump-to-form {
    display: flex;
    gap: 0.5rem;
}
.jump-to-input {
    width: 80px;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-align: center;
}
.jump-to-input:focus {
     outline: none;
    border-color: #f77f00;
    box-shadow: 0 0 0 2px rgba(247, 127, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .sales-record-container { padding: 1rem; }
    .form-grid, .filter-grid { grid-template-columns: 1fr; }
    .summary-cards, .product-cards { grid-template-columns: 1fr; }
    .records-header { flex-direction: column; align-items: stretch; }
    .records-table { font-size: 0.9rem; }
    .records-table th, .records-table td { padding: 0.5rem; }
    .actions { flex-direction: column; align-items: flex-start; }
    .pagination-container { flex-direction: column; }
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
.records-table tr {
    animation: fadeIn 0.5s ease;
}

