* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; font-family: system-ui, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; background: #0B2E22; color: #1C2321; }
body { padding: 24px; display: flex; justify-content: center; }
[hidden] { display: none !important; }

.card { width: 100%; background: #F7F3EC; border-radius: 22px; padding: 32px 28px; box-shadow: 0 30px 70px -30px rgba(0,0,0,.6); }
.card.narrow { max-width: 400px; align-self: center; }
.wrap { width: 100%; max-width: 860px; }

.brand { text-align: center; margin-bottom: 26px; }
.brand .logo { width: 56px; height: 56px; border-radius: 16px; margin: 0 auto 14px; background: linear-gradient(160deg, #2E9184, #0F3D2E); display: flex; align-items: center; justify-content: center; }
.brand h1 { font-size: 19px; font-weight: 700; color: #0F3D2E; }

label { display: block; font-size: 12.5px; color: #5B6B63; font-weight: 600; margin-bottom: 8px; }
input[type=text], input[type=password], select { width: 100%; background: #fff; border: 1.5px solid #E6E1D6; border-radius: 12px; padding: 12px 14px; font-size: 15px; font-family: inherit; margin-bottom: 14px; color: inherit; }
input.ltr { direction: ltr; text-align: left; }
input:focus, select:focus { outline: none; border-color: #1A6E62; }

button { font-family: inherit; cursor: pointer; border: none; border-radius: 12px; font-size: 14px; font-weight: 700; padding: 12px 18px; }
button.primary { width: 100%; background: #0F3D2E; color: #fff; padding: 14px; font-size: 15px; }
button.primary:hover { background: #0B2E22; }
button.primary:disabled { opacity: .6; cursor: wait; }
button.ghost { background: transparent; color: #0F3D2E; border: 1.5px solid #E6E1D6; }
button.ghost:hover { border-color: #1A6E62; }
button.danger { background: transparent; color: #C15C4A; border: 1.5px solid #E9CFC9; }
button.danger:hover { border-color: #C15C4A; }
button.small { padding: 7px 12px; font-size: 12.5px; }

.error { color: #C15C4A; font-size: 13px; text-align: center; margin-bottom: 14px; min-height: 1em; }
.error.inline { text-align: left; }

.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar h2 { font-size: 17px; color: #0F3D2E; }
.topbar .actions { display: flex; gap: 8px; align-items: center; }
.topbar a { text-decoration: none; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.tile { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; background: #fff; border: 1px solid #E6E1D6; border-radius: 18px; padding: 26px 16px; text-decoration: none; color: #1C2321; transition: transform .15s ease, border-color .15s ease; }
a.tile:hover { border-color: #1A6E62; transform: translateY(-2px); }
.tile.soon { opacity: .55; cursor: default; }
.tile .icn { width: 48px; height: 48px; border-radius: 14px; background: #E3EEE3; color: #0F3D2E; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; }
.tile .title { font-size: 15px; font-weight: 700; }
.tile .desc { font-size: 12px; color: #5B6B63; line-height: 1.7; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #E3EEE3; color: #0F3D2E; }
.badge.off { background: #F1E1DD; color: #C15C4A; }
.empty { text-align: center; color: #5B6B63; padding: 24px 0; font-size: 14px; }

.users { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.users th { text-align: left; font-size: 12px; color: #5B6B63; font-weight: 600; padding: 8px 10px; border-bottom: 1.5px solid #E6E1D6; }
.users td { padding: 12px 10px; border-bottom: 1px solid #EFEAE0; vertical-align: middle; }
.users .name small { display: block; color: #5B6B63; }
.users .row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.table-scroll { overflow-x: auto; }

.panel { background: #fff; border: 1px solid #E6E1D6; border-radius: 16px; padding: 20px; margin-bottom: 20px; }
.panel h3 { font-size: 15px; color: #0F3D2E; margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.grants { display: grid; gap: 8px; margin-bottom: 14px; }
.grant { display: flex; align-items: center; gap: 10px; background: #F7F3EC; border-radius: 12px; padding: 8px 12px; }
.grant input[type=checkbox] { width: 16px; height: 16px; }
.grant .gname { flex: 1; font-size: 14px; font-weight: 600; }
.grant select { width: auto; margin: 0; padding: 6px 10px; font-size: 13px; }
.form-actions { display: flex; gap: 8px; }
.form-actions button { width: auto; }
