* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background:
        radial-gradient(ellipse 95% 60% at 66% 18%, rgba(255, 255, 255, 0.92) 0%, rgba(255, 255, 255, 0.84) 46%, rgba(230, 235, 255, 0.62) 100%),
        linear-gradient(135deg, #e7ebff 0%, #f8fbff 45%, #e8ecff 100%);
    color: #13204f;
}

.main_cont {
    position: relative;
    width: min(1280px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 38px 30px;
    overflow: hidden;
    isolation: isolate;
}

.main_cont::before,
.main_cont::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: -1;
}

.main_cont::before {
    inset: -18% -8% 48% -12%;
    border: 2px solid rgba(255, 255, 255, 0.78);
    border-bottom: 0;
    border-radius: 0 0 58% 44%;
    transform: rotate(-8deg);
    opacity: 0.8;
}

.main_cont::after {
    left: -10%;
    right: 58%;
    bottom: -26%;
    height: 46%;
    border-radius: 0 100% 0 0;
    background: rgba(207, 216, 249, 0.3);
    box-shadow: 360px -120px 0 80px rgba(229, 234, 254, 0.48);
}

.main-building {
    position: fixed;
    right: -70px;
    bottom: 18px;
    z-index: -1;
    width: min(30vw, 390px);
    height: min(46vw, 500px);
    opacity: 0.18;
    clip-path: polygon(45% 0, 100% 36%, 100% 100%, 0 100%, 0 45%);
    background:
        linear-gradient(90deg, rgba(78, 105, 197, 0.18) 1px, transparent 1px) 0 0 / 54px 100%,
        linear-gradient(0deg, rgba(78, 105, 197, 0.16) 1px, transparent 1px) 0 0 / 100% 58px,
        linear-gradient(135deg, rgba(84, 113, 207, 0.72), rgba(255, 255, 255, 0.54));
    box-shadow: inset 64px 0 0 rgba(255, 255, 255, 0.34);
}

.page-header {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 22px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 14px;
    box-shadow: 0 18px 45px rgba(63, 80, 154, 0.12);
    backdrop-filter: blur(18px);
}

.page-title {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.page-logo {
    width: 74px;
    height: auto;
    flex: 0 0 auto;
}

.page-header h1 {
    margin: 0 0 6px;
    font-size: 32px;
    line-height: 1.1;
    color: #111a49;
    font-weight: 800;
    letter-spacing: 0;
}

.page-header p {
    margin: 0;
    color: #4e5870;
}

.page-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-actions form {
    margin: 0;
}

.btn {
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(180deg, #2448d9 0%, #18319e 100%);
    color: #fff;
    box-shadow: 0 10px 20px rgba(27, 58, 176, 0.22);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #2a54f1 0%, #1a35ad 100%);
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.82);
    color: #2f3a5b;
    border: 1px solid rgba(178, 188, 225, 0.62);
}

.btn-secondary:hover {
    background: #fff;
    color: #111a49;
}

.btn-danger {
    background: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background: #b91c1c;
}

.btn-edit {
    background: #eef2ff;
    border: 1px solid rgba(86, 105, 232, 0.28);
    color: #2448d9;
    box-shadow: none;
}

.btn-edit:hover {
    background: #dfe6ff;
    color: #18319e;
}

.table-card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 14px;
    padding: 22px;
    box-shadow: 0 24px 60px rgba(63, 80, 154, 0.14);
    overflow-x: auto;
    backdrop-filter: blur(18px);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: #eef2ff;
}

th,
td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid #e3e8f6;
    font-size: 14px;
}

th {
    color: #1f2b61;
    font-weight: 700;
}

td {
    color: #4e5870;
}

tbody tr:hover {
    background: rgba(238, 242, 255, 0.55);
}

.action-col {
    width: 180px;
}

.action-buttons {
    display: flex;
    gap: 8px;
}

.status-badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.status-active {
    background: #dcfce7;
    color: #166534;
}

.status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}

/* Overlay */
.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 26, 73, 0.28);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 998;
}

.drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Right Drawer */
.right-drawer {
    position: fixed;
    top: 0;
    right: -420px;
    width: 420px;
    max-width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 0.96);
    z-index: 999;
    box-shadow: -20px 0 45px rgba(63, 80, 154, 0.18);
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.right-drawer.active {
    right: 0;
}

.drawer-header {
    padding: 22px;
    border-bottom: 1px solid #e3e8f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.drawer-header h2 {
    margin: 0;
    font-size: 22px;
    color: #111a49;
}

.close-btn {
    background: transparent;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #637092;
}

.close-btn:hover {
    color: #111a49;
}

.drawer-form {
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    height: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: #2f3a5b;
}

.form-group label span {
    font-size: 11px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #cfd6ea;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #5669e8;
    box-shadow: 0 0 0 3px rgba(86, 105, 232, 0.16);
}

.drawer-actions {
    margin-top: auto;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #e3e8f6;
    padding-top: 18px;
}

.pagination-container {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}

.pagination-btn {
    border: none;
    border-radius: 8px;
    padding: 9px 14px;
    background: linear-gradient(180deg, #2448d9 0%, #18319e 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

.pagination-btn:hover {
    background: linear-gradient(180deg, #2a54f1 0%, #1a35ad 100%);
}

.pagination-btn:disabled {
    background: #cfd6ea;
    cursor: not-allowed;
}

#pageInfo {
    font-size: 14px;
    font-weight: 600;
    color: #4e5870;
}

.table-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.search-wrapper {
    position: relative;
    width: 280px;
    max-width: 100%;
}

.table-search-input {
    width: 100%;
    padding: 10px 38px 10px 12px;
    border: 1px solid #cfd6ea;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
    color: #2f3a5b;
    background: rgba(255, 255, 255, 0.86);
}

.table-search-input:focus {
    border-color: #5669e8;
    box-shadow: 0 0 0 3px rgba(86, 105, 232, 0.16);
}

.clear-search-icon {
    display: none;
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #c50f0f;
    cursor: pointer;
    font-size: 15px;
    padding: 4px;
    line-height: 1;
}

.clear-search-icon:hover {
    color: #111a49;
}

/* Responsive */
@media (max-width: 768px) {
    .main_cont {
        padding: 18px;
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px;
    }

    .page-title {
        align-items: flex-start;
    }

    .page-logo {
        width: 58px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .page-actions {
        width: 100%;
        justify-content: space-between;
    }

    .page-actions .btn {
        flex: 1;
    }

    .table-card {
        padding: 16px;
    }

    .right-drawer {
        width: 100%;
        right: -100%;
    }

    .action-buttons {
        flex-direction: column;
    }
}
