*{
    box-sizing:border-box;
    margin:0;
    padding:0;
    font-family:Arial, Tahoma, sans-serif;
}

html,body{
    width:100%;
    max-width:100%;
    overflow-x:hidden;
}

body{
    background:#f3f5f8;
    color:#222;
    line-height:1.5;
}

a{
    color:#1d4ed8;
    text-decoration:none;
}

.topbar{
    background:linear-gradient(135deg,#0b1220,#111827 55%,#172033);
    color:#fff;
    padding:14px 16px 18px;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:12px;
    position:sticky;
    top:0;
    z-index:50;
    box-shadow:0 4px 20px rgba(0,0,0,.18);
    border-bottom:1px solid rgba(255,255,255,.08);
}

.brand{
    width:100%;
    text-align:center;
    font-size:20px;
    font-weight:700;
    color:#ffffff;
    margin-bottom:4px;
}

.top-links{
    width:100%;
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    justify-content:center;
}

.lang-switch{
    width:100%;
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:8px;
}

.top-links a{
    color:#ffffff;
    text-decoration:none;
    background:linear-gradient(135deg,#243247,#32445f);
    border:1px solid rgba(255,255,255,.10);
    padding:10px 16px;
    border-radius:16px;
    display:inline-block;
    font-size:15px;
    font-weight:700;
    white-space:nowrap;
    box-shadow:0 4px 12px rgba(0,0,0,.18);
    transition:.2s ease;
}

.top-links a:hover,
.top-links a:focus{
    background:linear-gradient(135deg,#31507d,#416594);
    transform:translateY(-1px);
}

.lang-switch a{
    color:#ffffff;
    text-decoration:none;
    background:linear-gradient(135deg,#4b5563,#6b7280);
    border:1px solid rgba(255,255,255,.10);
    padding:9px 14px;
    border-radius:14px;
    display:inline-block;
    font-size:14px;
    font-weight:700;
    min-width:52px;
    text-align:center;
    box-shadow:0 4px 10px rgba(0,0,0,.16);
    transition:.2s ease;
}

.lang-switch a:hover,
.lang-switch a:focus{
    background:linear-gradient(135deg,#636f80,#7b8796);
    transform:translateY(-1px);
}

.container{
    width:100%;
    max-width:1280px;
    margin:18px auto;
    padding:0 12px 30px;
}

.card{
    width:100%;
    max-width:100%;
    background:#fff;
    border-radius:18px;
    padding:18px;
    box-shadow:0 4px 20px rgba(0,0,0,.06);
    margin-bottom:16px;
    overflow:hidden;
}

.hero{
    background:linear-gradient(135deg,#1f4fe0,#2f63ea,#3e79f2);
    color:#fff;
}

.hero p{
    opacity:.96;
    margin-top:8px;
}

h1,h2,h3{
    margin-bottom:12px;
}

form{
    display:grid;
    gap:12px;
    width:100%;
}

label{
    font-weight:700;
    font-size:14px;
    margin-bottom:4px;
    display:block;
}

input,select,button,textarea{
    width:100%;
    max-width:100%;
    padding:12px 13px;
    border:1px solid #d1d5db;
    border-radius:12px;
    font-size:15px;
    background:#fff;
}

input:focus,select:focus,textarea:focus{
    outline:none;
    border-color:#2563eb;
    box-shadow:0 0 0 3px rgba(37,99,235,.12);
}

button,.btn{
    background:#2563eb;
    color:#fff;
    border:none;
    cursor:pointer;
    text-decoration:none;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:6px;
    width:auto;
    max-width:100%;
    padding:10px 14px;
    border-radius:12px;
    font-size:14px;
    min-height:42px;
    text-align:center;
    white-space:nowrap;
}

.btn.gray{ background:#6b7280; }
.btn.red{ background:#dc2626; }
.btn.green{ background:#16a34a; }
.btn.orange{ background:#ea580c; }

.notice{
    padding:12px;
    border-radius:12px;
    background:#e0f2fe;
    color:#075985;
    margin-bottom:12px;
}

.error{
    padding:12px;
    border-radius:12px;
    background:#fee2e2;
    color:#991b1b;
    margin-bottom:12px;
}

.row-actions{
    display:flex;
    gap:6px;
    flex-wrap:wrap;
    align-items:center;
}

.grid2{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
    gap:14px;
}

.grid3{
    display:grid;
    grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
    gap:14px;
}

.stat{
    background:#fff;
    padding:16px;
    border-radius:16px;
    box-shadow:0 4px 20px rgba(0,0,0,.06);
}

.small{
    font-size:13px;
    color:#666;
}

.inline-form{
    display:grid;
    gap:8px;
    width:100%;
}

.pill{
    display:inline-block;
    padding:6px 10px;
    border-radius:999px;
    font-size:12px;
    background:#eef2ff;
    color:#1e3a8a;
}

.copy-field{
    display:grid;
    grid-template-columns:1fr auto;
    gap:8px;
    align-items:center;
    width:100%;
}

.copy-field input{
    min-width:0;
}

.table-wrap{
    width:100%;
    max-width:100%;
    overflow:hidden;
}

.responsive-table{
    width:100%;
    border-collapse:collapse;
    background:#fff;
    table-layout:fixed;
}

.responsive-table th,
.responsive-table td{
    padding:12px 10px;
    border-bottom:1px solid #e5e7eb;
    text-align:start;
    vertical-align:middle;
    font-size:14px;
    word-wrap:break-word;
    overflow-wrap:anywhere;
}

.responsive-table th{
    background:#f8fafc;
    font-weight:700;
}

.mobile-cards{
    display:none;
}

.mobile-card{
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:14px;
    padding:12px;
    margin-bottom:12px;
    box-shadow:0 2px 8px rgba(0,0,0,.04);
}

.mobile-card-row{
    display:flex;
    justify-content:space-between;
    gap:10px;
    padding:6px 0;
    border-bottom:1px dashed #e5e7eb;
}

.mobile-card-row:last-child{
    border-bottom:none;
}

.mobile-label{
    font-weight:700;
    color:#374151;
    font-size:13px;
    flex:0 0 40%;
}

.mobile-value{
    text-align:end;
    flex:1 1 auto;
    font-size:13px;
    word-break:break-word;
    overflow-wrap:anywhere;
}

.mobile-actions{
    display:grid;
    gap:8px;
    margin-top:10px;
}

.mobile-actions .btn,
.mobile-actions button{
    width:100%;
}

.toast{
    position:fixed;
    left:50%;
    bottom:20px;
    transform:translateX(-50%) translateY(20px);
    background:#111827;
    color:#fff;
    padding:12px 16px;
    border-radius:14px;
    opacity:0;
    pointer-events:none;
    transition:.25s ease;
    z-index:200;
    font-size:14px;
    box-shadow:0 6px 20px rgba(0,0,0,.2);
    max-width:calc(100% - 24px);
    text-align:center;
}

.toast.show{
    opacity:1;
    transform:translateX(-50%) translateY(0);
}

@media (max-width:768px){
    .topbar{
        justify-content:center;
        padding:12px 10px 16px;
    }

    .brand{
        font-size:18px;
        margin-bottom:6px;
    }

    .top-links,
    .lang-switch{
        justify-content:center;
        width:100%;
    }

    .top-links a{
        font-size:13px;
        padding:10px 14px;
        border-radius:15px;
    }

    .lang-switch a{
        font-size:13px;
        padding:8px 12px;
        min-width:48px;
        border-radius:13px;
    }

    .container{
        padding:0 8px 24px;
        margin:12px auto;
    }

    .card{
        padding:12px;
        border-radius:14px;
    }

    h1,h2,h3{
        font-size:18px;
        line-height:1.4;
    }

    label{
        font-size:13px;
    }

    input,select,button,textarea{
        font-size:14px;
        padding:11px 12px;
    }

    .grid2,
    .grid3{
        grid-template-columns:1fr;
    }

    .row-actions{
        display:grid;
        gap:8px;
    }

    .row-actions .btn,
    .row-actions button{
        width:100%;
    }

    .copy-field{
        grid-template-columns:1fr;
    }

    .copy-field .btn{
        width:100%;
    }

    .desktop-table{
        display:none;
    }

    .mobile-cards{
        display:block;
    }
}

@media (min-width:769px){
    .desktop-table{
        display:block;
    }

    .mobile-cards{
        display:none;
    }
}