/* ═══════════════════════════════════════════════════════════════════
   Hajipur - Add Raw Material Page Styles
   ═══════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────
   Container
   ───────────────────────────────────────────────────────────────── */
.arm-container {
    padding: 24px;
    background-color: #f5f5f7;
    min-height: calc(100vh - 60px);
}

/* ─────────────────────────────────────────────────────────────────
   Header & Tabs
   ───────────────────────────────────────────────────────────────── */
.arm-header {
    background: white;
    padding: 20px 24px;
    margin-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.arm-tabs {
    display: flex;
    gap: 12px;
    align-items: center;
}

.arm-tab {
    padding: 8px 20px;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    color: #6b7280;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.arm-tab:hover {
    border-color: #9ca3af;
    color: #374151;
}

.arm-tab-active {
    background: white;
    color: #1f2937;
    border-color: #1f2937;
    font-weight: 600;
}

.arm-tab-info-icon {
    width: 16px;
    height: 16px;
    background-color: #3b82f6;
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

/* ─────────────────────────────────────────────────────────────────
   PMR Information Grid
   ───────────────────────────────────────────────────────────────── */
.arm-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 24px;
    background: #fafafa;
    padding: 24px;
    border-bottom: 1px solid #e8e8e8;
}

.arm-info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.arm-info-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

.arm-info-value {
    font-size: 14px;
    font-weight: 400;
    color: #1f2937;
}

/* ─────────────────────────────────────────────────────────────────
   Split Layout
   ───────────────────────────────────────────────────────────────── */
.arm-split-layout {
    display: grid;
    grid-template-columns: 1fr 480px;
    gap: 20px;
    background: #fafafa;
    padding: 20px;
    border-radius: 0 0 8px 8px;
}

.arm-split-left {
    min-height: 400px;
}

/* ─────────────────────────────────────────────────────────────────
   Planning Table (Left Side)
   ───────────────────────────────────────────────────────────────── */
.arm-table-wrapper {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: white;
}

.arm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.arm-table thead {
    background-color: #ede9fe;
}

.arm-table thead th {
    padding: 13px 16px;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e0e0e0;
    font-size: 13px;
}

.arm-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
}

.arm-table tbody tr:last-child {
    border-bottom: none;
}

.arm-table tbody td {
    padding: 11px 16px;
    color: #1f2937;
    background-color: white;
}

.arm-table tbody tr:nth-child(odd) td:not(.arm-table-type-cell) {
    background-color: #fafafa;
}

.arm-table-type-cell {
    font-weight: 500;
    color: #374151;
    background-color: white !important;
    font-size: 13px;
}

/* ─────────────────────────────────────────────────────────────────
   Form Controls (Inputs & Selects)
   ───────────────────────────────────────────────────────────────── */
.arm-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    color: #1f2937;
    background-color: white;
    transition: all 0.2s;
}

.arm-input:hover {
    border-color: #d1d5db;
}

.arm-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.arm-select-wrapper {
    position: relative;
    width: 100%;
}

.arm-select {
    width: 100%;
    padding: 8px 32px 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    color: #1f2937;
    background-color: white;
    cursor: pointer;
    appearance: none;
    transition: all 0.2s;
}

.arm-select:hover {
    border-color: #d1d5db;
}

.arm-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.arm-select-chevron {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #9ca3af;
    display: flex;
    align-items: center;
}

.arm-select-chevron svg {
    width: 16px;
    height: 16px;
}

/* ─────────────────────────────────────────────────────────────────
   Raw Material Card (Right Side)
   ───────────────────────────────────────────────────────────────── */
.arm-raw-material-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    display: flex;
    flex-direction: column;
    height: fit-content;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.arm-rm-header {
    padding: 18px 20px;
    border-bottom: 1px solid #e8e8e8;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.arm-rm-title {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 4px 0;
}

.arm-rm-subtitle {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
    line-height: 1.4;
}

.arm-btn-add-material {
    padding: 7px 16px;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.arm-btn-add-material:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

/* ─────────────────────────────────────────────────────────────────
   Raw Material Table
   ───────────────────────────────────────────────────────────────── */
.arm-rm-table-wrapper {
    padding: 0 20px;
    max-height: 385px;
    overflow-y: auto;
}

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

.arm-rm-table thead th {
    padding: 13px 8px;
    text-align: left;
    font-weight: 600;
    color: #6b7280;
    font-size: 12px;
    position: sticky;
    top: 0;
    background: white;
    z-index: 1;
    border-bottom: 1px solid #f0f0f0;
}

.arm-rm-table tbody tr {
    border-bottom: 1px solid #f5f5f5;
}

.arm-rm-table tbody tr:last-child {
    border-bottom: none;
}

.arm-rm-table tbody td {
    padding: 11px 8px;
}

.arm-rm-input {
    text-align: right;
    padding: 8px 12px;
}

/* ─────────────────────────────────────────────────────────────────
   Icon Buttons
   ───────────────────────────────────────────────────────────────── */
.arm-icon-btn {
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    color: #d1d5db;
    transition: all 0.2s;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.arm-icon-btn:hover {
    color: #ef4444;
    background-color: #fef2f2;
}

.arm-btn-delete-mat:hover {
    color: #ef4444;
}

/* ─────────────────────────────────────────────────────────────────
   Footer Section
   ───────────────────────────────────────────────────────────────── */
.arm-rm-footer {
    padding: 18px 20px;
    border-top: 1px solid #e8e8e8;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* ─────────────────────────────────────────────────────────────────
   Warning Alert
   ───────────────────────────────────────────────────────────────── */
.arm-warning-alert {
    display: flex;
    gap: 10px;
    padding: 12px 14px;
    background-color: #fef9e7;
    border: 1px solid #f9e4a3;
    border-radius: 6px;
    align-items: flex-start;
}

.arm-warning-icon {
    color: #f59e0b;
    flex-shrink: 0;
    margin-top: 1px;
}

.arm-warning-text {
    font-size: 11px;
    color: #b45309;
    line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────────────
   Action Buttons
   ───────────────────────────────────────────────────────────────── */
.arm-rm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.arm-btn-cancel,
.arm-btn-submit {
    padding: 9px 22px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.arm-btn-cancel {
    background-color: white;
    border: 1px solid #d1d5db;
    color: #374151;
}

.arm-btn-cancel:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.arm-btn-submit {
    background-color: #1e3a8a;
    color: white;
    border: 1px solid #1e3a8a;
}

.arm-btn-submit:hover {
    background-color: #1e40af;
}

/* ─────────────────────────────────────────────────────────────────
   Scrollbar Styling
   ───────────────────────────────────────────────────────────────── */
.arm-rm-table-wrapper::-webkit-scrollbar {
    width: 5px;
}

.arm-rm-table-wrapper::-webkit-scrollbar-track {
    background: #f9fafb;
    border-radius: 3px;
}

.arm-rm-table-wrapper::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.arm-rm-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ─────────────────────────────────────────────────────────────────
   Responsive Design
   ───────────────────────────────────────────────────────────────── */
@media (max-width: 1280px) {
    .arm-split-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .arm-raw-material-card {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .arm-container {
        padding: 16px;
    }

    .arm-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px 16px;
        padding: 16px;
    }

    .arm-split-layout {
        padding: 16px;
    }

    .arm-header {
        padding: 16px;
    }

    .arm-tabs {
        overflow-x: auto;
    }

    .arm-table thead th,
    .arm-table tbody td {
        padding: 10px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .arm-info-grid {
        grid-template-columns: 1fr;
    }

    .arm-rm-header {
        flex-direction: column;
        gap: 12px;
        align-items: stretch;
    }

    .arm-btn-add-material {
        width: 100%;
        justify-content: center;
    }

    .arm-rm-actions {
        flex-direction: column;
    }

    .arm-btn-cancel,
    .arm-btn-submit {
        width: 100%;
    }
}
