﻿.k-grid-header .k-header {
    font-weight: bold;
}

.k-grid tbody tr .k-button.OnlyHover {
    display: none;
}

.k-grid tbody tr:hover .k-button.OnlyHover {
    display: inline-flex;
}

.k-grid,
.k-grid {
    width: 100%;
    margin-top: 60px;
}

.download-link {
    color: #0000FF;
    text-decoration: none;
}

.download-link:hover {
    color: #FF0000;
    /* Change to your desired hover color */
    text-decoration: underline;
}

/* Government-style Radzen DataGrid */
.rz-data-grid {
    width: 100% !important;
    font-family: Arial, sans-serif !important;
    font-size: 13px !important;
    border: 1px solid #d5dce5 !important;
    border-radius: 3px !important;
    overflow: hidden !important;
}

/* Table header */
.rz-data-grid .rz-grid-table thead th {
    background: #174a84 !important;
    color: #fff !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    padding: 9px 10px !important;
    border-color: #d5dce5 !important;
    white-space: nowrap !important;
}

/* Table cells */
.rz-data-grid .rz-grid-table tbody td {
    padding: 7px 10px !important;
    font-size: 13px !important;
    color: #26374a !important;
    border-color: #e1e6ed !important;
    vertical-align: middle !important;
}

/* Alternating rows */
.rz-data-grid .rz-grid-table tbody tr:nth-child(even) {
    background: #f5f8fb !important;
}

.rz-data-grid .rz-grid-table tbody tr:hover {
    background: #eaf2fa !important;
}

/* Grid borders */
.rz-data-grid .rz-grid-table {
    margin-bottom: 0 !important;
    border-collapse: collapse !important;
}

/* Pagination footer */
.rz-data-grid .rz-pager {
    padding: 5px 8px !important;
    background: #f5f7fa !important;
    border-top: 1px solid #d5dce5 !important;
    font-size: 12px !important;
}

/* Paging buttons */
.rz-data-grid .rz-pager button {
    min-width: 30px !important;
    min-height: 30px !important;
    font-size: 12px !important;
    border-radius: 3px !important;
}

/* Paging summary */
.rz-data-grid .rz-pager .rz-pager-summary {
    font-size: 12px !important;
    color: #34465a !important;
}

/* Action column */
.rz-data-grid .rz-grid-table th:last-child,
.rz-data-grid .rz-grid-table td:last-child {
    text-align: center !important;
    white-space: nowrap !important;
}

/* Mobile */
@media (max-width: 768px) {
    .rz-data-grid .rz-grid-table thead th {
        padding: 8px !important;
        font-size: 12px !important;
    }

    .rz-data-grid .rz-grid-table tbody td {
        padding: 7px 8px !important;
        font-size: 12px !important;
    }

    .rz-data-grid .rz-pager {
        flex-wrap: wrap !important;
        gap: 4px !important;
    }
}

.gov-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 32px;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.gov-btn-primary {
    color: #fff;
    background: #174a84;
    border: 1px solid #174a84;
}

.gov-btn-primary:hover {
    background: #103865;
}

.gov-btn-outline {
    color: #174a84;
    background: #fff;
    border: 1px solid #b8c5d3;
    min-width: 32px;
}


/* Main page */
.app-page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 6px;
    font-family: Arial, sans-serif;
    color: #26374a;
    font-size: 13px;
    box-sizing: border-box;
}

/* Page header */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    margin-bottom: 8px;
    background: #174a84;
    color: #fff;
    border-radius: 3px;
}

.page-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
}

.page-subtitle {
    margin-top: 2px;
    font-size: 12px;
    color: #e3ebf5;
}

.record-number {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 5px 9px;
    background: #fff;
    color: #174a84;
    border-radius: 3px;
    font-size: 12px;
}

.record-number strong {
    font-size: 14px;
}

/* Cards */
.card {
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #d5dce5;
    border-radius: 3px;
    overflow: visible;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    background: #f2f5f9;
    border-bottom: 1px solid #d5dce5;
}

.section-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    background: #174a84;
    color: #fff;
    border-radius: 3px;
    font-size: 16px;
}

.section-header h5 {
    margin: 0;
    color: #174a84;
    font-size: 14px;
    font-weight: 700;
}

.section-header span {
    font-size: 12px;
    color: #617184;
}

/* Form fields */
.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px 12px;
    padding: 10px;
}

.field {
    min-width: 0;
}

.field>label {
    display: block;
    margin-bottom: 4px;
    color: #34465a;
    font-size: 13px;
    font-weight: 600;
}

.required {
    color: #c62828;
}

.modern-input,
.grid-input,
.quantity-input {
    width: 100% !important;
    min-width: 0;
    min-height: 34px;
    padding: 5px 8px !important;
    border: 1px solid #c7d0dc !important;
    border-radius: 3px !important;
    background: #fff !important;
    color: #26374a !important;
    font-family: Arial, sans-serif;
    font-size: 13px !important;
    box-sizing: border-box;
    box-shadow: none !important;
}

.modern-input:focus,
.grid-input:focus,
.quantity-input:focus {
    border-color: #174a84 !important;
    outline: 1px solid #174a84;
}

.modern-input:disabled {
    background: #f0f2f5 !important;
    color: #64748b !important;
}

.remarks-field {
    grid-column: span 2;
}

.source-field {
    grid-column: span 2;
}

.source-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.source-option {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 5px 9px;
    border: 1px solid #c7d0dc;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
}

.source-option input {
    accent-color: #174a84;
}

.source-option strong {
    font-size: 13px;
}

/* Item selector */
.item-selector {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px 10px;
    border-bottom: 1px solid #d5dce5;
    background: #fff;
}

.selector-label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #174a84;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.item-count {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border: 1px solid #c7d0dc;
    border-radius: 3px;
    color: #174a84;
    background: #fff;
    font-size: 12px;
    font-weight: 600;
}

/* Items grid */
.data-grid-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.data-grid {
    width: 100% !important;
    font-size: 13px !important;
}

.data-grid .rz-grid-table {
    margin-bottom: 0 !important;
    border-collapse: collapse !important;
}

.data-grid .rz-grid-table thead th {
    padding: 7px 8px !important;
    background: #174a84 !important;
    color: #fff !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    border-color: #d5dce5 !important;
    white-space: nowrap;
}

.data-grid .rz-grid-table tbody td {
    padding: 5px 8px !important;
    color: #26374a !important;
    font-size: 13px !important;
    border-color: #e1e6ed !important;
    vertical-align: middle !important;
}

.data-grid .rz-grid-table tbody tr:nth-child(even) {
    background: #f6f8fb !important;
}

.data-grid .rz-grid-table tbody tr:hover {
    background: #eaf2fa !important;
}

.data-grid .rz-pager {
    padding: 4px 8px !important;
    background: #f2f5f9 !important;
    border-top: 1px solid #d5dce5 !important;
}

/* Item details */
.item-info {
    display: flex;
    align-items: center;
    gap: 7px;
}

.item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 27px;
    height: 27px;
    flex-shrink: 0;
    background: #edf3f9;
    color: #174a84;
    border-radius: 3px;
}

.item-name {
    font-weight: 600;
    overflow-wrap: anywhere;
}

.stock-badge {
    display: inline-block;
    padding: 3px 6px;
    background: #edf3f9;
    color: #174a84;
    border: 1px solid #d5e0ed;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
}

.unit-text {
    color: #34465a;
    font-size: 13px;
}

.quantity-wrapper {
    min-width: 75px;
}

.quantity-input {
    min-width: 75px;
    text-align: right;
}

.quantity-error {
    display: block;
    color: #c62828;
    font-size: 11px;
}

.grid-input {
    min-width: 100px;
}

.quantity-total {
    text-align: right;
    white-space: nowrap;
    font-size: 12px;
}

.quantity-total strong {
    color: #174a84;
}

.grid-header-with-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.add-grid-btn,
.delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 29px;
    height: 29px;
    border-radius: 3px;
    cursor: pointer;
}

.add-grid-btn {
    border: 1px solid #fff;
    background: #fff;
    color: #174a84;
}

.delete-btn {
    border: 1px solid #e0b9b9;
    background: #fff;
    color: #b42318;
}

.add-grid-btn:hover {
    background: #eaf2fa;
}

.delete-btn:hover {
    background: #fcecec;
}

/* Bottom action bar */
.action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 10px;
    margin-top: 8px;
    background: #f2f5f9;
    border: 1px solid #d5dce5;
    border-radius: 3px;
}

.action-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: #34465a;
    font-size: 12px;
}

.action-summary>span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.action-summary strong {
    color: #174a84;
}

.summary-divider {
    height: 18px;
    border-left: 1px solid #c7d0dc;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Responsive layout */
@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .app-page {
        padding: 4px;
    }

    .page-header {
        align-items: flex-start;
        padding: 7px;
    }

    .page-title {
        font-size: 15px;
    }

    .page-subtitle {
        font-size: 11px;
    }

    .record-number {
        flex-shrink: 0;
    }

    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 8px;
    }

    .remarks-field,
    .source-field {
        grid-column: 1 / -1;
    }

    .section-header {
        padding: 6px 8px;
    }

    .section-header h5 {
        font-size: 13px;
    }

    .section-header span {
        font-size: 11px;
    }

    .item-selector {
        padding: 7px 8px;
    }

    .action-bar {
        align-items: flex-start;
    }

    .action-summary {
        gap: 7px;
    }

    .action-buttons {
        width: 100%;
    }
}

@media (max-width: 380px) {
    .form-grid {
        grid-template-columns: 1fr;
    }

    .remarks-field,
    .source-field {
        grid-column: auto;
    }

    .page-header {
        flex-wrap: wrap;
    }

    .record-number {
        flex-direction: row;
        align-items: center;
        gap: 6px;
    }
}

.status-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

/* 1 - Applied */
.status-1 {
    background-color: #e0f2fe;
    color: #075985;
}

/* 2 - Recommended */
.status-2 {
    background-color: #fef3c7;
    color: #92400e;
}

/* 3 - Store Head Approved */
.status-3 {
    background-color: #dbeafe;
    color: #1e40af;
}

/* 4 - Section Head Approved */
.status-4 {
    background-color: #ede9fe;
    color: #5b21b6;
}

/* 5 - Office Pramukh Approved */
.status-5 {
    background-color: #dcfce7;
    color: #166534;
}

/* 6 - Rejected */
.status-6 {
    background-color: #fee2e2;
    color: #991b1b;
}