﻿/* ========== 0) Base / Reset ========== */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

.app-layout {
    padding-top: 0;
}

.layout-root {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    height: auto;
    overflow: visible;
}

/* ========== 1) Header ========== */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 45px;
    z-index: 1000;
    background-color: #fff;
    display: flex;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.toggle-btn {
    font-size: 1.5rem;
    margin-left: .3rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 2;
    position: relative;
}

.sub-toggle-btn {
    font-size: 1.5rem;
    margin-left: .5rem;
    background: none;
    color: #fff;
    border: none;
    padding: 1.7rem 0;
    cursor: pointer;
    z-index: 2;
    position: relative;
}

.user-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    white-space: nowrap;
    overflow: hidden;
    min-width: 100px;
}

.user-btn {
    background: none;
    border: none;
    color: #374151;
    font-weight: 600;
    padding: .4rem .6rem;
    cursor: pointer;
    transition: background-color .2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

    .user-btn:hover {
        background-color: #f3f4f6;
        border-radius: 6px;
    }

.user-menu .dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    padding: .75rem 1rem;
    z-index: 999;
    min-width: 160px;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    animation: fadeIn .2s ease-out;
}

    .user-menu .dropdown a {
        font-size: 14px;
        color: #2c3e50;
        text-decoration: none;
        padding: .25rem 0;
        transition: color .2s, transform .2s;
    }

        .user-menu .dropdown a:hover {
            color: #1abc9c;
            transform: translateX(4px);
        }

.logout-btn {
    background: none;
    border: none;
    color: #2c3e50;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    padding: .25rem 0;
    transition: color .2s;
}

    .logout-btn:hover {
        color: #1abc9c;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.app-center {
    padding: 5px 1px;
}

.body-header {
    width: 100%;
    height: 35px;
    background-color: #1f2937;
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.body-header-title {
    font-size: 1.25rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    .body-header-title {
        font-size: 1rem;
    }

        .body-header-title .full-text {
            display: none;
        }
}

/* ========== 2) Top Tabs ========== */
.top-tab-menu {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    padding: 6px 8px !important;
    overflow-x: auto !important; /* ✅ 핵심 */
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

    .top-tab-menu.hidden {
        display: none !important;
        height: auto !important;
        visibility: visible !important;
    }

    .top-tab-menu.visible {
        display: flex !important;
    }

.tab-button {
    background: transparent;
    border: none;
    padding: 4px 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    border-radius: 1px;
    transition: color 0.3s, border-bottom 0.3s, border 0.3s;
}

    .tab-button:hover {
        color: #1d4ed8;
        border: 1px solid #d1d5db;
    }

    .tab-button.active {
        color: #1d4ed8;
        border-bottom-color: #1d4ed8;
        border: 1px solid #1d4ed8;
        background-color: #f3f4f6;
    }

@media (max-width: 767px) {
    .top-tab-menu {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 6px !important;
        padding: 6px 8px !important;
        overflow-x: auto !important; /* ✅ 핵심 */
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
    }

        .top-tab-menu::-webkit-scrollbar {
            display: none; /* Chrome/Safari */
        }

    .tab-button {
        flex: 0 0 auto !important;
        width: auto !important;
        text-align: center !important;
        height: 40px;
        padding: 0 12px !important;
        border-radius: 999px;
        white-space: nowrap;
    }
}

/* ========== 3) Top Menu (secondary) ========== */
.top-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: stretch;
    background-color: #fff;
    border-bottom: 1px solid #ccc;
    position: relative;
    height: auto;
}

    .top-menu.hidden {
        margin-top: 40px;
        visibility: hidden;
        height: 0;
    }

    .top-menu.visible {
        margin-top: 50px;
    }

.menu-item {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    line-height: 1.5rem;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color .2s;
}

    .menu-item:hover {
        background-color: #e5e7eb;
    }

    .menu-item.disabled {
        color: #9ca3af;
        cursor: not-allowed;
    }

    .menu-item.active {
        background-color: #dbeafe;
        color: #1d4ed8;
    }

    .menu-item .icon {
        margin-right: 6px;
    }

.active-tab {
    background-color: #B2CCFF;
}

/* ========== 4) Sidebar ========== */
.sidebar {
    width: 200px;
    background-color: #1F2937;
    color: #fff;
    position: fixed;
    top: 45px;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: flex;
    flex-direction: column;
    transition: width .3s;
}

    .sidebar.collapsed {
        width: 64px;
    }

.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,.2);
}

.logo-company {
    height: 24px;
    width: auto;
    max-height: 24px;
    object-fit: contain;
}

    .logo-company.expanded {
        height: 32px;
        width: auto;
        object-fit: contain;
    }

@media (max-width: 768px) {
    .top-menu {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu-item {
        width: 100%;
        text-align: left;
        display: flex;
        justify-content: flex-start;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform .3s;
    }

    .sidebar-open .sidebar {
        transform: translateX(0);
    }

    .overlay {
        display: block;
        position: fixed;
        top: 64px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,.4);
        z-index: 20;
    }
}

/* 메뉴/탭 로고 크기 고정 */
.top-menu .menu-item img,
.top-tab-menu .tab-button img,
.top-menu .menu-item svg,
.top-tab-menu .tab-button svg,
.header-brand-logo,
.brand-logo {
    height: 35px;
    width: auto;
    max-height: 35px;
    flex: 0 0 auto;
    object-fit: contain;
}

.top-menu .menu-item,
.top-tab-menu .tab-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

@media (max-width: 768px) {
    .top-menu .menu-item,
    .top-tab-menu .tab-button {
        width: 100%;
    }

        .top-menu .menu-item img,
        .top-tab-menu .tab-button img,
        .top-menu .menu-item svg,
        .top-tab-menu .tab-button svg {
            height: 20px !important;
            max-height: 20px !important;
        }
}

/* ========== 5) Cards / Forms ========== */
.form-container {
    width: 100%;
    margin: 0;
    background: #fff;
    padding: 4px;
    border-radius: 16px;
    box-shadow: 0 10px 20px rgba(0,0,0,.1);
}

.info-container {
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.my-info-card {
    max-width: 700px;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,.1);
    background: #fff;
}

.card-box {
    border: 1px solid #ddd;
    border-radius: 10px;
    background: #fff;
    padding: 4px;
    margin-bottom: 5px;
    box-shadow: 0 1px 6px rgba(0,0,0,.08);
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 1px solid #eee;
}

/* grids */
.grid-2col, .grid-3col, .grid-3col-234, .grid-4col {
    display: grid;
    gap: 1px 20px;
    align-items: center;
    width: 100%;
}

.grid-2col {
    grid-template-columns: 1fr 1fr;
}

.grid-3col {
    grid-template-columns: 1fr 1fr 1fr;
}

.grid-4col {
    grid-template-columns: 1fr 1fr 1fr 1fr;
}

.grid-3col-234 {
    grid-template-columns: 2fr 3fr 4fr;
}

@media (max-width: 768px) {
    .grid-2col, .grid-3col, .grid-3col-234, .grid-4col {
        grid-template-columns: 1fr;
    }
}

.form-group {
    display: flex;
    flex-direction: column;
    padding-bottom: 1px;
}

.field-label {
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 1px;
}

.field-input {
    padding: 4px 8px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #333;
    transition: border-color .2s;
    margin-bottom: 0;
}

    .field-input:focus {
        border-color: #1abc9c;
        outline: none;
    }

textarea.field-input {
    width: 100%;
    min-height: 100px;
    resize: vertical;
}

input:invalid, textarea:invalid, select:invalid {
    border-color: #e74c3c;
}

/* File upload */
.file-box {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    border: 2px dashed #ccc;
    border-radius: 6px;
    padding: 12px;
    justify-content: center;
    cursor: pointer;
    transition: background .3s;
}

    .file-box:hover {
        background: #f0f8ff;
    }

    .file-box label, .file-box button {
        font-size: 14px;
        font-weight: 600;
        border: none;
        border-radius: 6px;
        padding: 10px 20px;
        cursor: pointer;
        transition: background-color .2s;
    }

    .file-box label {
        background: #3498db;
        color: #fff;
    }

        .file-box label:hover {
            background: #2980b9;
        }

    .file-box button {
        background: #e74c3c;
        color: #fff;
    }

        .file-box button:hover {
            background: #c0392b;
        }

.upload-list {
    margin-top: 12px;
    background: #f9f9f9;
    padding: 16px;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
}

    .upload-list li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 4px 0;
        border-bottom: 1px solid #eee;
    }

    .upload-list button {
        background: transparent;
        color: #d00;
        border: none;
        cursor: pointer;
        font-size: 14px;
        margin-left: 12px;
    }

.preview-image {
    max-width: 100px;
    max-height: 100px;
    object-fit: cover;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-right: 8px;
}

.preview-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* ========== 6) Buttons (non-Radzen generic) ========== */
.btn {
    padding: 5px 10px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color .2s;
}

.btn-text {
    display: inline;
    margin-left: 4px;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .btn-text {
        display: none;
    }
}

.material-icons {
    vertical-align: middle;
    font-size: 20px;
}

/* Card header */
.card-box-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem;
    margin-bottom: .5rem;
}

    .card-box-header .card-title {
        margin: 0;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
    }

.edit-button {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    height: 32px;
    padding: 4px 12px;
}

@media (max-width: 768px) {
    .hide-on-mobile {
        display: none !important;
    }
}

/* ========== 7) Dashboard / Lists ========== */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: .25rem;
    padding: .25rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.info-card {
    background: #fff;
    border-radius: 1rem;
    padding: .1rem;
    box-shadow: 0 2px 6px rgba(0,0,0,.05);
    transition: transform .2s ease-in-out;
}

    .info-card:hover {
        transform: translateY(-3px);
    }

    .info-card h3 {
        margin-bottom: .5rem;
        font-size: 1.1rem;
        color: #374151;
    }

    .info-card p {
        font-size: 1.8rem;
        font-weight: bold;
        color: #1f2937;
    }

.info-card-list {
    max-height: 400px;
    overflow-y: auto;
}

/* ========== 8) DataGrid compact (Radzen) ========== */
.rz-datatable .rz-column-header,
.radzen-datagrid thead tr th {
    text-align: center;
}

.rz-datatable .rz-datatable-tbody > tr {
    height: 20px;
}

    .rz-datatable .rz-datatable-tbody > tr > td {
        padding: 1px 1px;
        vertical-align: middle;
    }

.rz-datatable td, .rz-datatable .rz-cell-data {
    padding: 1px 1px;
    height: auto !important;
    font-size: 14px !important;
    line-height: 1.0 !important;
}

.rz-datatable th,
.rz-datatable thead tr,
.rz-datatable .rz-column-title {
    font-size: 14px !important;
    line-height: 1.0 !important;
    min-height: 10px !important;
}

.rz-datatable .rz-data-row {
    min-height: 10px !important;
}

.rz-datagrid .rz-cell-filter-content input,
.rz-datagrid .rz-cell-filter-content input.rz-textbox {
    height: 20px !important;
    font-size: 12px !important;
    padding: 5px !important;
}

.rz-datagrid .rz-cell-filter-label,
.rz-datagrid .rz-unselectable-text {
    height: 20px !important;
    font-size: 12px !important;
    padding: 0 !important;
}

/* ========== 9) Login ========== */
.login-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    align-items: center;
    background-color: #f9fafc;
    font-family: 'Segoe UI', sans-serif;
}

.login-card {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,.05);
    max-width: 400px;
    margin: 4rem auto;
    font-family: 'Segoe UI', sans-serif;
}

.login-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 4rem;
    margin-bottom: 2rem;
}

.company-logo {
    width: 150px;
    height: 50px;
    object-fit: contain;
}

.brand-logo {
    width: 100px;
    height: 30px;
    object-fit: contain;
}

.login-title {
    font-size: 2rem;
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
}

.login-body {
    width: 100%;
    max-width: 400px;
    padding: 2rem;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0,0,0,.06);
    border-radius: 10px;
    margin-bottom: auto;
}

.login-footer {
    margin-top: auto;
    padding: 2rem 1rem;
    text-align: center;
    font-size: .85rem;
    color: #999;
}

.form-control {
    width: 100%;
    padding: .6rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1rem;
}

.login-btn {
    flex: 1;
    padding: .6rem 1.2rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .2s;
    text-align: center;
}

.btn-primary {
    background-color: #2c3e50;
    color: #fff;
}

    .btn-primary:hover {
        background-color: #1a252f;
    }

.btn-secondary {
    background-color: #bdc3c7;
    color: #2c3e50;
}

    .btn-secondary:hover {
        background-color: #aeb6bf;
    }

.text-danger {
    color: #e74c3c;
    font-size: .9rem;
}

/* ========== 10) Begin/Complete (리팩토링 핵심) ========== */
/*
  목표:
  - 착수/완료 2개를 좌우 균등(50:50)
  - 데스크탑: 내부 입력+버튼 1행 유지
  - 화면이 좁아지면 자동으로 1열로 내려가서 오버 방지
  - min-width 강제값 제거(오버의 원인)
*/
.begin-complete-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: .5rem;
    width: 100%;
    max-width: 100%;
}

    .begin-complete-grid .work-column {
        min-width: 0; /* ✅ 오버 방지 */
    }

.work-column > label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

/* 카드 내부 row */
.work-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: nowrap; /* 데스크탑 1행 */
    min-width: 0; /* ✅ 오버 방지 */
    width: 100%;
    border: 1px solid #ddd;
    padding: .5rem;
    border-radius: 8px;
    background: #f9f9f9;
}

/* 입력 공통 */
.begin-complete-date-field-input,
.time-input {
    padding: 4px 4px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    color: #333;
    transition: border-color .2s;
    margin-bottom: 0;
}

/* 날짜는 버튼 때문에 밀릴 수 있으니 줄어들 수 있게 */
.begin-complete-date-field-input {
    width: auto;
    min-width: 140px;
    flex: 1 1 160px;
}

/* 시/분은 고정폭 */
.time-input {
    width: 56px;
    flex: 0 0 56px;
}

.time-sep {
    flex: 0 0 auto;
}

/* 버튼은 줄바꿈 금지 + 오른쪽 정렬 */
.work-row .btn-start,
.work-row .begin-complete-btn,
.work-row .rz-button {
    flex: 0 0 auto;
    white-space: nowrap;
    margin-left: auto;
}

/* 버튼 베이스 */
.begin-complete-edit-btn,
.begin-complete-btn {
    align-self: center;
    padding: .25rem;
    background-color: #f97316;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* 창이 애매하게 좁아질 때는 1열로 내려서 오버 방지 */
@media (max-width: 900px) {
    .begin-complete-grid {
        grid-template-columns: 1fr;
    }
}

/* 모바일: 한 줄 유지 + 비율 배분(기존 의도 유지) */
@media (max-width: 768px) {
    .begin-complete-grid {
        grid-template-columns: 1fr;
    }

    .work-row {
        flex-wrap: nowrap;
        align-items: center;
        gap: .4rem;
    }

    .begin-complete-date-field-input,
    .time-input,
    .btn-start,
    .begin-complete-btn {
        width: auto;
        min-width: 0;
        max-width: none !important;
    }

    .begin-complete-date-field-input {
        flex: 1 1 42%;
    }

    .time-input {
        flex: 0 1 18%;
    }

    .time-sep {
        flex: 0 0 auto;
    }

    .work-row .btn,
    .work-row .btn-start,
    .work-row .begin-complete-btn,
    .work-row .rz-button {
        flex: 1 1 22%;
        justify-content: center;
        margin-left: 0;
    }

    .work-column {
        width: 100%;
    }
}

/* ========== 11) Utilities ========== */
.text-center {
    text-align: center;
}

.pdf-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    background: url('/icons/pdf-icon.svg') no-repeat center/contain;
    margin-right: 8px;
    vertical-align: middle;
}

/* Overview */
.overview-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
    font-family: 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #1f2937;
}

.overview-header {
    text-align: left;
    margin-bottom: 40px;
}

    .overview-header h1 {
        font-size: 2.5rem;
        color: #1d4ed8;
        margin-bottom: 10px;
    }

    .overview-header p {
        font-size: 1.2rem;
        color: #6b7280;
    }

.overview-section {
    margin-bottom: 40px;
}

    .overview-section h2 {
        font-size: 1.5rem;
        margin-bottom: 10px;
        color: #111827;
    }

    .overview-section p {
        font-size: 1rem;
        color: #374151;
        background: #f9fafb;
        padding: 15px;
        border-left: 4px solid #1d4ed8;
        border-radius: 4px;
    }

.overview-footer {
    text-align: center;
    font-size: .9rem;
    color: #9ca3af;
    margin-top: 60px;
}

.system-title, .system-desc {
    font-size: 1.6rem;
    font-weight: bold;
    text-align: center;
    line-height: 1.5;
}

.system-title {
    color: #1d4ed8;
}

.abbr-colored {
    color: #1d4ed8;
}

.text-fade {
    color: #6b7280;
    font-weight: normal;
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: inline;
}

@media (max-width: 768px) {
    .mobile-only {
        display: inline;
    }

    .desktop-only {
        display: none;
    }

    .system-title {
        font-size: 1.3rem;
    }

    .abbr-colored {
        text-align: left;
    }
}

/* 기본 버튼 그룹 (데스크탑/공통) */
.button-group {
    display: flex;
    align-items: center;
    justify-content: flex-end; /* 왼쪽정렬이면 flex-start로 */
    gap: 8px;
    flex-wrap: wrap; /* 좁으면 줄바꿈 허용(원치 않으면 nowrap) */
}

/* ========== 12) Mobile button unified ========== */
@media (max-width: 768px) {
    .button-group.mobile-unified {
        position: sticky;
        bottom: 0;
        left: 0;
        right: 0;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        padding: 8px 12px;
        margin-top: 8px;
        background: #fff;
        border-top: 1px solid #eee;
        z-index: 20;
    }

        .button-group.mobile-unified .rz-button {
            flex: 1 1 0 !important;
            min-width: 0;
            height: 56px !important;
            border-radius: 12px !important;
            padding: 0 !important;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            box-shadow: 0 2px 6px rgba(0,0,0,0.06);
        }

            .button-group.mobile-unified .rz-button img {
                width: 24px !important;
                height: 24px !important;
                flex: 0 0 auto;
                object-fit: contain;
            }

        .button-group.mobile-unified .hide-on-mobile {
            display: none !important;
        }
}

@media (max-width: 360px) {
    .button-group.mobile-unified {
        flex-direction: column !important;
    }

        .button-group.mobile-unified .rz-button {
            width: 100%;
        }
}

/* ========== 13) Dialog edgefill / stickyfill / page-edgefill ========== */
.edgefill .rz-dialog-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px !important;
}

.edgefill .top-actions,
.edgefill .bottom-actions {
    flex: 0 0 auto;
}

.edgefill .grid-fill-wrap {
    flex: 1 1 auto;
    min-height: 0;
}

    .edgefill .grid-fill-wrap .rz-data-grid {
        height: 100% !important;
    }

.edgefill .bottom-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(0,0,0,.06);
}

@media (min-width: 641px) {
    .edgefill .rz-dialog {
        margin: 16px !important;
        border-radius: 8px;
    }

    .edgefill .top-actions {
        padding: 8px 0 12px;
    }
}

@media (max-width: 640px) {
    .edgefill .rz-dialog {
        width: 100vw !important;
        height: 100dvh !important;
        max-width: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .edgefill .rz-dialog-content {
        padding: 0 !important;
    }

    .edgefill .top-actions, .edgefill .bottom-actions {
        padding: 0 !important;
        margin: 0 !important;
    }

    .edgefill .bottom-actions {
        display: flex;
        gap: 8px;
        justify-content: stretch;
        padding: 8px;
    }

        .edgefill .bottom-actions .rz-button {
            flex: 1 1 0;
        }
}

/* Page: page-edgefill */
.page-edgefill {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
}

    .page-edgefill .top-actions,
    .page-edgefill .bottom-actions {
        flex: 0 0 auto;
    }

    .page-edgefill .grid-fill-wrap {
        flex: 1 1 auto;
        min-height: 0;
    }

        .page-edgefill .grid-fill-wrap .rz-data-grid {
            height: 100% !important;
        }

@media (min-width: 641px) {
    .page-edgefill {
        padding: 16px;
    }

        .page-edgefill .bottom-actions {
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid rgba(0,0,0,.06);
            display: flex;
            gap: 8px;
            justify-content: flex-end;
        }
}

@media (max-width: 640px) {
    .page-edgefill {
        padding: 0;
    }

        .page-edgefill .bottom-actions {
            padding: 8px;
            display: flex;
            gap: 8px;
            justify-content: stretch;
        }

            .page-edgefill .bottom-actions .rz-button {
                flex: 1 1 0;
            }
}

.edgefill .card-box, .page-edgefill .card-box {
    width: 100%;
    margin: 0 0 12px 0;
}

.edgefill .form-container, .page-edgefill .form-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.edgefill .card-box .field-input,
.edgefill .card-box .rz-inputtext, .edgefill .card-box .rz-textarea,
.edgefill .card-box .rz-dropdown, .edgefill .card-box .rz-multiselect,
.edgefill .card-box .rz-listbox, .edgefill .card-box .rz-calendar,
.edgefill .card-box .rz-spinner, .edgefill .card-box .rz-numeric, .edgefill .card-box .rz-autocomplete,
.page-edgefill .card-box .field-input,
.page-edgefill .card-box .rz-inputtext, .page-edgefill .card-box .rz-textarea,
.page-edgefill .card-box .rz-dropdown, .page-edgefill .card-box .rz-multiselect,
.page-edgefill .card-box .rz-listbox, .page-edgefill .card-box .rz-calendar,
.page-edgefill .card-box .rz-spinner, .page-edgefill .card-box .rz-numeric, .page-edgefill .card-box .rz-autocomplete {
    width: 100% !important;
    box-sizing: border-box;
}

.edgefill .rz-listbox, .edgefill .rz-data-grid,
.page-edgefill .rz-listbox, .page-edgefill .rz-data-grid {
    width: 100% !important;
}

/* stickyfill */
.stickyfill .rz-dialog-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.stickyfill .grid-fill-wrap {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
}

    .stickyfill .grid-fill-wrap .rz-data-grid {
        height: 100% !important;
    }

.stickyfill .bottom-actions {
    position: sticky;
    bottom: 0;
    background: var(--rz-base-background, #fff);
    padding: 12px 0 0;
    margin-top: 12px;
    border-top: 1px solid rgba(0,0,0,.06);
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    z-index: 1;
}

@media (max-width: 640px) {
    .stickyfill .rz-dialog {
        width: 100vw !important;
        height: 100dvh !important;
        max-width: none !important;
        margin: 0 !important;
        border-radius: 0 !important;
    }

    .stickyfill .rz-dialog-content {
        padding: 0 !important;
    }

    .stickyfill .bottom-actions {
        padding: 8px;
        justify-content: stretch;
    }

        .stickyfill .bottom-actions .rz-button {
            flex: 1 1 0;
        }
}
