@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Cairo:wght@400;500;600;700;800&display=swap');

:root{
    --bg:#f4efef;
    --card:#ffffff;
    --soft:#f3f5ff;
    --primary:#0d2a78;
    --primary-2:#183a9c;
    --text:#16171d;
    --muted:#667085;
    --line:#e9e6e6;
    --danger:#c93636;
    --shadow:0 18px 55px rgba(14,24,55,.08);
    --radius-xl:28px;
    --radius-lg:20px;
    --radius-md:16px;
}

*{
    box-sizing:border-box;
}

html,body{
    margin:0;
    padding:0;
    background:var(--bg);
    color:var(--text);
}

body{
    font-family:'Inter',sans-serif;
    min-height:100vh;
}

body.lang-ar{
    font-family:'Cairo',sans-serif;
}

a{
    text-decoration:none;
    color:inherit;
}

button,
input,
select{
    font:inherit;
}

.container{
    width:min(1180px,calc(100% - 32px));
    margin-inline:auto;
}

.site-header{
    padding:24px 0 10px;
}

.nav-wrap{
    background:var(--card);
    border-radius:24px;
    padding:18px 22px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:18px;
    box-shadow:var(--shadow);
}

.brand{
    display:flex;
    align-items:center;
    gap:12px;
}

.brand-logo{
    font-size:42px;
    font-weight:800;
    color:var(--primary);
    line-height:1;
}

.menu{
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
}

.menu-link{
    background:#f2ecec;
    border-radius:14px;
    padding:14px 20px;
    font-weight:600;
    transition:.25s ease;
}

.menu-link:hover{
    transform:translateY(-1px);
    background:#ece5e5;
}

.lang-switch{
    display:flex;
    align-items:center;
    gap:10px;
}

.lang-btn{
    border-radius:14px;
    padding:14px 18px;
    background:#f2e7e7;
    color:#673636;
    font-weight:700;
}

.lang-btn.active{
    background:var(--primary);
    color:#fff;
}

.main-card{
    margin-top:22px;
    background:var(--card);
    border-radius:32px;
    box-shadow:var(--shadow);
    padding:48px 48px 34px;
}

.hero{
    text-align:center;
    padding:20px 0 28px;
}

.hero h1{
    margin:0;
    font-size:clamp(34px,5vw,62px);
    line-height:1.05;
    font-weight:800;
}

.hero p{
    margin:18px auto 0;
    max-width:740px;
    color:var(--muted);
    font-size:20px;
}

.lookup-box{
    background:#eef2ff;
    border-radius:28px;
    padding:26px;
    border:2px dashed #4a7bff;
}

.filters-grid{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:16px;
}

.field{
    display:flex;
    flex-direction:column;
    gap:9px;
}

.field label{
    font-weight:700;
    font-size:14px;
}

.field input,
.field select{
    width:100%;
    height:56px;
    border:none;
    outline:none;
    border-radius:18px;
    padding:0 18px;
    background:#fff;
    color:var(--text);
    box-shadow:0 2px 12px rgba(20,20,20,.04);
}

.search-wrap{
    display:flex;
    align-items:center;
    gap:14px;
    margin-top:20px;
}

.search-input{
    flex:1;
    height:66px;
    border:none;
    outline:none;
    border-radius:22px;
    padding:0 24px;
    background:#fff;
    font-size:18px;
    box-shadow:0 2px 12px rgba(20,20,20,.04);
}

.primary-btn,
.secondary-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    min-height:54px;
    padding:0 26px;
    border:none;
    border-radius:18px;
    font-weight:800;
    cursor:pointer;
    transition:.22s ease;
}

.primary-btn{
    background:var(--primary);
    color:#fff;
}

.primary-btn:hover{
    background:var(--primary-2);
    transform:translateY(-1px);
}

.secondary-btn{
    background:#f2e7e7;
    color:#6b3f3f;
}

.results-head{
    margin-top:22px;
}

.results-head h2{
    margin:0;
    font-size:24px;
}

.results-list{
    margin-top:16px;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
}

.result-card{
    background:#fff;
    border-radius:22px;
    padding:20px;
    box-shadow:0 10px 25px rgba(24,39,75,.07);
}

.result-card .pc{
    display:inline-flex;
    background:var(--primary);
    color:#fff;
    padding:10px 14px;
    border-radius:14px;
    font-weight:800;
    margin-bottom:14px;
}

.result-card h3{
    margin:0 0 10px;
    font-size:22px;
}

.result-meta{
    color:var(--muted);
    line-height:1.8;
}

.empty-state{
    background:#fff;
    border-radius:22px;
    padding:22px;
    color:var(--muted);
}

.login-page{
    min-height:100vh;
    display:grid;
    place-items:center;
    padding:24px;
}

.login-card{
    width:min(480px,100%);
    background:#fff;
    border-radius:28px;
    box-shadow:var(--shadow);
    padding:28px;
}

.login-card h1{
    margin:0 0 18px;
}

.full-btn{
    width:100%;
}

.alert{
    background:#fff1f1;
    color:#922;
    border:1px solid #f0c8c8;
    padding:14px 16px;
    border-radius:16px;
    margin-bottom:16px;
}

.alert.success{
    background:#eefcf1;
    color:#155a28;
    border-color:#bce8c6;
}

.panel-layout{
    display:grid;
    grid-template-columns:280px 1fr;
    min-height:100vh;
}

.panel-sidebar{
    background:#0f204e;
    color:#fff;
    padding:24px 18px;
    display:flex;
    flex-direction:column;
    gap:12px;
    position:sticky;
    top:0;
    height:100vh;
}

.panel-brand{
    font-size:26px;
    font-weight:800;
    margin-bottom:12px;
}

.panel-link{
    padding:14px 16px;
    border-radius:16px;
    color:#dfe7ff;
    font-weight:700;
    transition:.2s ease;
}

.panel-link:hover,
.panel-link.active{
    background:rgba(255,255,255,.12);
    color:#fff;
}

.panel-link.danger{
    margin-top:auto;
    background:rgba(255,255,255,.08);
}

.panel-main{
    padding:24px;
    display:flex;
    flex-direction:column;
    gap:20px;
}

.panel-card{
    background:#fff;
    border-radius:24px;
    padding:22px;
    box-shadow:var(--shadow);
}

.panel-card h1,
.panel-card h2{
    margin-top:0;
}

.grid-form{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
}

.full-row{
    grid-column:1/-1;
}

.checkbox-field{
    justify-content:flex-end;
}

.inline-form{
    display:flex;
    align-items:end;
    gap:14px;
    flex-wrap:wrap;
}

.data-table{
    width:100%;
    border-collapse:collapse;
    overflow:hidden;
}

.data-table th,
.data-table td{
    text-align:start;
    padding:14px 12px;
    border-bottom:1px solid var(--line);
    vertical-align:top;
}

.data-table th{
    background:#f8f9fc;
    font-size:14px;
}

.actions-cell{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
}

.table-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:40px;
    padding:0 14px;
    border:none;
    border-radius:12px;
    background:#edf2ff;
    color:#17368f;
    font-weight:700;
    cursor:pointer;
}

.table-btn.danger{
    background:#fff1f1;
    color:var(--danger);
}

.stats-total{
    margin:16px 0;
    font-size:18px;
}

@media (max-width: 960px){
    .nav-wrap{
        flex-wrap:wrap;
        justify-content:center;
    }

    .menu{
        order:3;
        width:100%;
        justify-content:center;
    }

    .filters-grid{
        grid-template-columns:1fr;
    }

    .search-wrap{
        flex-direction:column;
    }

    .search-input,
    .primary-btn{
        width:100%;
    }

    .results-list{
        grid-template-columns:1fr;
    }

    .panel-layout{
        grid-template-columns:1fr;
    }

    .panel-sidebar{
        position:relative;
        height:auto;
    }

    .grid-form{
        grid-template-columns:1fr;
    }

    .data-table{
        display:block;
        overflow-x:auto;
        white-space:nowrap;
    }
}
.site-footer{
    padding:20px 0 32px;
}

.footer-wrap{
    background:var(--card);
    border-radius:24px;
    padding:18px 22px;
    box-shadow:var(--shadow);
    display:flex;
    justify-content:center;
    align-items:center;
}

.footer-wrap a{
    font-weight:800;
    color:var(--primary);
}

.postal-box{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    background:#f6f8ff;
    border:1px solid #dde4ff;
    border-radius:18px;
    padding:14px 16px;
    margin-bottom:16px;
}

.postal-value{
    font-size:24px;
    font-weight:800;
    color:var(--primary);
    letter-spacing:.5px;
}

.copy-btn,
.details-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:0 16px;
    border:none;
    border-radius:12px;
    font-weight:800;
    cursor:pointer;
    transition:.22s ease;
}

.copy-btn{
    background:var(--primary);
    color:#fff;
}

.copy-btn:hover{
    background:var(--primary-2);
}

.result-actions{
    margin-top:14px;
}

.details-btn{
    background:#edf2ff;
    color:#17368f;
}

.area-page-card{
    background:#fff;
    border-radius:28px;
    box-shadow:var(--shadow);
    padding:28px;
}

.area-page-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:16px;
    margin-top:18px;
}

.area-detail-box{
    background:#f8f9fc;
    border-radius:18px;
    padding:16px;
}

.area-detail-box strong{
    display:block;
    margin-bottom:8px;
}

.link-list{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px;
    margin-top:18px;
}

.link-card{
    background:#fff;
    border-radius:18px;
    padding:16px;
    box-shadow:0 8px 20px rgba(24,39,75,.06);
}

@media (max-width: 960px){
    .postal-box{
        flex-direction:column;
        align-items:stretch;
    }

    .copy-btn,
    .details-btn{
        width:100%;
    }

    .area-page-grid,
    .link-list{
        grid-template-columns:1fr;
    }
}