.iran-plate {
    width: 340px;
    max-width: 100%;
    height: 78px;
    box-sizing: border-box;
    display: flex;
    align-items: stretch;
    direction: ltr;
    overflow: hidden;
    border: 2px solid #202020;
    border-radius: 5px;
    background: #fff;
    color: #111;
    font-family: Tahoma, Arial, sans-serif;
    line-height: 1;
}

.iran-plate__blue {
    width: 43px;
    flex: 0 0 43px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: #0756a5;
    color: #fff;
}

.iran-plate__flag {
    width: 23px;
    height: 13px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-bottom: 2px;
    border: 1px solid rgba(255, 255, 255, .8);
}

.iran-plate__flag span { flex: 1; }
.iran-plate__flag span:nth-child(1) { background: #239653; }
.iran-plate__flag span:nth-child(2) { background: #fff; }
.iran-plate__flag span:nth-child(3) { background: #e53935; }

.iran-plate__country {
    font-family: Arial, sans-serif;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.05;
}

.iran-plate__main {
    min-width: 0;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    padding: 0 5px;
    box-sizing: border-box;
    white-space: nowrap;
}

.iran-plate__part,
.iran-plate__letter,
.iran-plate__field {
    color: #111;
    font-size: clamp(19px, 6vw, 29px);
    font-weight: 700;
    line-height: 1;
    text-align: center;
    font-family: Tahoma, Arial, sans-serif;
}

.iran-plate__first {
    flex: 1;
    border-right: 1px solid #333;
    padding-right: 5px;
}

.iran-plate__letter {
    flex: 0 0 34px;
    border-right: 1px solid #333;
    padding: 0 4px;
}

.iran-plate__last { flex: 1.4; }

.iran-plate__city {
    flex: 0 0 49px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-left: 1px solid #222;
}

.iran-plate__iran { font-size: 12px; font-weight: 700; }
.iran-plate__city-code { font-size: 23px; font-weight: 700; line-height: 1; }
.iran-plate__legacy { overflow: hidden; max-width: 100%; font-size: 17px; font-weight: 700; text-overflow: ellipsis; }

.iran-plate--input .iran-plate__field {
    min-width: 0;
    height: 100%;
    box-sizing: border-box;
    margin: 0;
    border: 0;
    border-radius: 0;
    outline: 0;
    background: transparent;
    box-shadow: none;
    padding: 0 2px;
}

.iran-plate--input .iran-plate__field:focus { box-shadow: inset 0 0 0 2px #0d4a9e; }
.iran-plate--input .iran-plate__letter { appearance: none; cursor: pointer; font-size: 22px; padding: 0; }
.iran-plate--input .iran-plate__city-code { width: 100%; height: auto; }
.admin-shell .panel .iran-plate--input .iran-plate__field {
    width: auto;
    min-width: 0;
    min-height: 0;
    height: 100%;
    margin: 0;
    padding: 0 2px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #111;
    font-family: Tahoma, Arial, sans-serif;
    font-size: clamp(19px, 6vw, 29px);
    font-weight: 700;
    line-height: 1;
    text-align: center;
}
.admin-shell .panel .iran-plate--input .iran-plate__field:focus {
    box-shadow: inset 0 0 0 2px #0d4a9e;
}
.admin-shell .panel .iran-plate--input .iran-plate__letter { appearance: none; cursor: pointer; font-size: 22px; padding: 0; }
.admin-shell .panel .iran-plate--input .iran-plate__city-code { width: 100%; height: auto; }
.admin-shell .panel select:not(.iran-plate__field) {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    direction: rtl;
    text-overflow: ellipsis;
}
.driver-details-grid .plate-field-group { grid-column: 1 / -1; }
.driver-plates { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.registration-documents { margin: 12px 0; padding: 12px; border: 1px solid var(--admin-line, #e5ebf2); border-radius: 10px; background: var(--admin-page, #f4f7fa); }
.registration-documents h4 { margin: 0 0 8px; }
.document-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.vehicle-type-row { display: grid; grid-template-columns: minmax(220px, 1fr) auto auto; align-items: center; gap: 8px; }
.vehicle-type-row form:first-child { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }

@media (max-width: 380px) {
    .iran-plate { height: 65px; }
    .iran-plate__blue { width: 36px; flex-basis: 36px; }
    .iran-plate__city { flex-basis: 43px; }
    .iran-plate__letter { flex-basis: 28px; }
    .iran-plate__city-code { font-size: 19px; }
}
