.portal-ad-main { padding: 22px 0 38px; }
.portal-ad-heading { min-height: 104px; padding: 14px 22px; display: grid; grid-template-columns: minmax(230px,.8fr) minmax(360px,1.55fr) minmax(176px,.55fr); align-items: center; gap: 24px; border: 1px solid #b9cbe4; border-radius: 6px; background: linear-gradient(110deg,#fffdf7 0 58%,#edf4ff 100%); box-shadow: 0 10px 24px rgba(61,90,132,.08); }
.portal-ad-heading > div:first-child > span, .portal-ad-records header span { color: #5a7fca; font-size: 10px; font-weight: 900; letter-spacing: 0; }
.portal-ad-heading h1 { margin: 4px 0 3px; color: #263c5d; font-size: 25px; }
.portal-ad-heading p { margin: 0; color: #708198; font-size: 12px; }
.portal-ad-rules { min-width: 0; padding: 10px 14px; border-left: 3px solid #d49a37; border-radius: 0 4px 4px 0; background: rgba(255,249,232,.82); }
.portal-ad-rules > span { display: block; color: #b07820; font-size: 9px; font-weight: 900; }
.portal-ad-rules strong { display: block; margin-top: 2px; color: #3e4f68; font-size: 13px; }
.portal-ad-rules p { margin-top: 4px; color: #6d6250; font-size: 11px; line-height: 1.55; }
.portal-ad-account { min-width: 176px; padding-left: 20px; border-left: 1px solid #cfdaea; display: grid; justify-items: end; gap: 3px; }
.portal-ad-account small { color: #7d8ba0; font-size: 10px; }
.portal-ad-account strong { color: #416ebd; font-size: 22px; }
.portal-ad-account a, .portal-ad-account button { padding: 0; border: 0; color: #b67922; background: transparent; font-size: 11px; }
.portal-ad-view-tabs { margin-top: 12px; height: 42px; padding: 4px; display: inline-flex; gap: 3px; border: 1px solid #c6d4e7; border-radius: 6px; background: #f7f9fc; }
.portal-ad-view-tabs a { min-width: 112px; height: 32px; padding: 0 15px; display: grid; place-items: center; border-radius: 4px; color: #5f7089; font-size: 12px; font-weight: 800; }
.portal-ad-view-tabs a.active { color: #fff; background: #5a81c9; box-shadow: 0 3px 8px rgba(61,101,173,.18); }
.portal-ad-flash { margin: 12px 0 0; padding: 10px 13px; border: 1px solid; border-radius: 5px; font-size: 12px; }
.portal-ad-flash.success { color: #25644f; border-color: #a8d4c2; background: #eef9f4; }
.portal-ad-flash.error { color: #a34444; border-color: #e5b7b1; background: #fff3f0; }
.portal-ad-slots { margin-top: 12px; padding: 5px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 5px; border: 1px solid #c3d2e6; border-radius: 6px; background: #f4f7fb; }
.portal-ad-slots a { min-height: 72px; padding: 11px 15px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-content: center; gap: 3px 16px; border: 1px solid transparent; border-radius: 4px; color: #566981; background: #fff; }
.portal-ad-slots a:hover { border-color: #9eb7dc; }
.portal-ad-slots a.active { border-color: #668bd0; background: linear-gradient(135deg,#fdfbf3,#e8f1ff); box-shadow: inset 3px 0 #547dc5; }
.portal-ad-slots span { color: #344d72; font-size: 14px; font-weight: 900; }
.portal-ad-slots strong { grid-row: 1 / 3; grid-column: 2; align-self: center; color: #bd7820; font-size: 20px; }
.portal-ad-slots small { color: #7a899d; font-size: 10px; }
.portal-ad-workspace { margin-top: 12px; display: grid; grid-template-columns: 300px minmax(0,1fr); border: 1px solid #bfcfe4; border-radius: 6px; overflow: hidden; background: #fff; box-shadow: 0 12px 28px rgba(60,87,124,.08); }
.portal-ad-specification { padding: 22px; border-right: 1px solid #cfdaea; background: linear-gradient(155deg,#fffaf0,#eef4fc); }
.portal-ad-specification > span { color: #6e87b1; font-size: 10px; font-weight: 900; }
.portal-ad-specification h2 { margin: 5px 0 16px; color: #2e486c; font-size: 19px; }
.portal-ad-specification dl { margin: 0; display: grid; gap: 8px; }
.portal-ad-specification dl div { display: flex; justify-content: space-between; gap: 15px; padding-bottom: 8px; border-bottom: 1px solid #d8e1ed; }
.portal-ad-specification dt { color: #7b8899; font-size: 11px; }
.portal-ad-specification dd { margin: 0; color: #405d88; font-size: 11px; font-weight: 800; }
.portal-ad-specification p { margin: 12px 0 0; color: #748296; font-size: 11px; line-height: 1.6; }
.portal-ad-size-preview { margin-top: 17px; display: grid; place-items: center; align-content: center; gap: 3px; border: 1px dashed #7999c8; border-radius: 4px; color: #5273a7; background: rgba(255,255,255,.68); }
.portal-ad-size-preview.is-core { aspect-ratio: 4 / 1; }
.portal-ad-size-preview.is-partner { aspect-ratio: 30 / 11; }
.portal-ad-size-preview.is-service { width: 78%; aspect-ratio: 16 / 9; }
.portal-ad-size-preview.is-text { min-height: 112px; padding: 10px; gap: 8px; }
.portal-ad-size-preview.is-text > div { width: 100%; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); grid-template-rows: repeat(2,28px); border-top: 1px solid #e79c46; border-left: 1px solid #e79c46; }
.portal-ad-size-preview.is-text i { min-width: 0; display: grid; place-items: center; overflow: hidden; border-right: 1px solid #e79c46; border-bottom: 1px solid #e79c46; color: #175fd0; background: #fffca3; font-size: 8px; font-style: normal; white-space: nowrap; }
.portal-ad-size-preview span { font-size: 10px; }
.portal-ad-size-preview b { font-size: 12px; }
.portal-ad-form { padding: 22px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); align-content: start; gap: 14px; }
.portal-ad-form > label { min-width: 0; display: grid; gap: 6px; color: #50647e; font-size: 11px; font-weight: 800; }
.portal-ad-form input[type="text"], .portal-ad-form input:not([type]) { width: 100%; }
.portal-ad-form input:not([type="checkbox"]):not([type="file"]) { height: 39px; padding: 0 11px; border: 1px solid #bccbe0; border-radius: 4px; color: #263b59; background: #fbfdff; font-size: 12px; }
.portal-ad-form input:focus { border-color: #5d86cc; outline: 2px solid rgba(93,134,204,.13); }
.portal-ad-field-wide { grid-column: 1 / -1; }
.portal-ad-upload > div { padding: 13px; display: grid; grid-template-columns: minmax(220px,280px) minmax(0,1fr); align-items: center; gap: 16px; border: 1px solid #c7d4e5; border-radius: 5px; background: #f7f9fc; }
.portal-ad-upload figure { margin: 0; width: 100%; overflow: hidden; display: grid; place-items: center; border: 1px solid #8ca8d1; border-radius: 4px; color: #6e83a3; background: #eaf1fb; }
.portal-ad-upload figure.is-core { aspect-ratio: 4 / 1; }
.portal-ad-upload figure.is-partner { aspect-ratio: 30 / 11; }
.portal-ad-upload figure.is-service { max-width: 280px; aspect-ratio: 16 / 9; }
.portal-ad-upload figure img { width: 100%; height: 100%; object-fit: cover; }
.portal-ad-upload figure b { font-size: 11px; }
.portal-ad-upload aside { min-width: 0; display: grid; gap: 7px; }
.portal-ad-upload aside input { max-width: 100%; color: #53667e; font-size: 11px; }
.portal-ad-upload aside strong { color: #4269a8; font-size: 12px; }
.portal-ad-upload aside small { color: #7a889b; font-size: 10px; font-weight: 400; line-height: 1.55; }
.portal-ad-color-control { min-width: 0; height: 39px; padding: 4px 10px 4px 5px; display: flex; align-items: center; gap: 10px; border: 1px solid #bccbe0; border-radius: 4px; background: #fbfdff; }
.portal-ad-color-control input[type="color"] { flex: 0 0 44px; width: 44px; height: 29px; padding: 2px; border: 1px solid #aebed4; border-radius: 3px; background: #fff; cursor: pointer; }
.portal-ad-color-control output { min-width: 0; overflow: hidden; color: #60738c; font: 700 11px/1 Consolas,"Courier New",monospace; text-overflow: ellipsis; white-space: nowrap; }
.portal-ad-text-live-preview { min-width: 0; display: grid; gap: 6px; color: #50647e; font-size: 11px; font-weight: 800; }
.portal-ad-text-live-preview > a { height: 45px; min-width: 0; padding: 0 12px; display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid #e48e3a; background: #fffca3; pointer-events: none; }
.portal-ad-text-live-preview b { min-width: 0; max-width: 100%; overflow: hidden; font-size: 14px; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.portal-ad-text-live-preview small { color: #7a889b; font-size: 10px; font-weight: 400; }
.portal-ad-consent { padding: 11px 12px; grid-template-columns: 16px minmax(0,1fr); align-items: start; border: 1px solid #e1cc9f; border-radius: 4px; color: #70582e !important; background: #fff9e9; font-weight: 500 !important; line-height: 1.55; }
.portal-ad-consent input { margin: 2px 0 0; accent-color: #557fc6; }
.portal-ad-form-actions { min-height: 48px; padding-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid #d7e0ec; }
.portal-ad-form-actions span { color: #6d7d91; font-size: 11px; }
.portal-ad-form-actions span strong { color: #3f67aa; font-size: 15px; }
.portal-ad-form-actions button { min-width: 158px; height: 38px; border: 1px solid #476fb4; border-radius: 4px; color: #fff; background: #557fc6; font-size: 12px; font-weight: 900; }
.portal-ad-form-actions button:hover { background: #466fb6; }
.portal-ad-form-actions button:disabled { cursor: not-allowed; color: #8b95a4; border-color: #c5ccd5; background: #e7e9ed; }
.portal-ad-empty { min-height: 310px; padding: 32px; display: grid; place-items: center; align-content: center; gap: 11px; color: #748399; text-align: center; }
.portal-ad-empty strong { color: #3c5475; font-size: 17px; }
.portal-ad-empty span { font-size: 11px; }
.portal-ad-empty a, .portal-ad-empty button { min-width: 132px; height: 36px; padding: 0 15px; display: inline-grid; place-items: center; border: 1px solid #557fc6; border-radius: 4px; color: #fff; background: #557fc6; font-size: 12px; }
.portal-ad-records { margin-top: 12px; border: 1px solid #bfcfe4; border-radius: 6px; overflow: hidden; background: #fff; }
.portal-ad-records > header { min-height: 66px; padding: 13px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border-bottom: 1px solid #d1dce9; background: linear-gradient(90deg,#fffdf7,#edf4ff); }
.portal-ad-records h2 { margin: 3px 0 0; color: #304966; font-size: 17px; }
.portal-ad-records header a { height: 32px; padding: 0 13px; display: grid; place-items: center; border: 1px solid #6387c5; border-radius: 4px; color: #466da9; background: #f7faff; font-size: 11px; font-weight: 800; }
.portal-ad-table-wrap { overflow-x: auto; }
.portal-ad-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.portal-ad-table th { height: 40px; padding: 0 13px; color: #63758d; background: #eef3f9; font-size: 10px; text-align: left; }
.portal-ad-table td { padding: 12px 13px; border-top: 1px solid #dce4ed; color: #53657c; font-size: 11px; }
.portal-ad-table td:first-child strong, .portal-ad-table td:first-child small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.portal-ad-table td:first-child strong { color: #304b6f; font-size: 12px; }
.portal-ad-table td:first-child small { margin-top: 3px; color: #8995a5; font-size: 9px; }
.portal-ad-status { display: inline-flex; padding: 4px 8px; border-radius: 3px; font-size: 10px; font-weight: 900; }
.portal-ad-status.status-pending { color: #98641f; background: #fff0ca; }
.portal-ad-status.status-approved { color: #2a7058; background: #dff4eb; }
.portal-ad-status.status-rejected { color: #a04b46; background: #fde5e2; }
.portal-ad-status.status-expired { color: #6d7380; background: #e8ebef; }
@media (max-width: 1050px) {
  .portal-ad-slots { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .portal-ad-heading { grid-template-columns: minmax(0,1fr) auto; }
  .portal-ad-rules { grid-row: 2; grid-column: 1 / -1; }
  .portal-ad-workspace { grid-template-columns: 1fr; }
  .portal-ad-specification { border-right: 0; border-bottom: 1px solid #cfdaea; }
  .portal-ad-size-preview { max-width: 300px; }
  .portal-ad-table { min-width: 760px; }
}
@media (max-width: 600px) {
  .portal-ad-main { padding-top: 12px; }
  .portal-ad-heading { min-height: 0; padding: 14px; align-items: flex-start; }
  .portal-ad-heading h1 { font-size: 19px; }
  .portal-ad-heading p { display: none; }
  .portal-ad-account { min-width: 112px; padding-left: 12px; }
  .portal-ad-account strong { font-size: 16px; }
  .portal-ad-rules { padding: 9px 11px; }
  .portal-ad-rules p { display: block; font-size: 10px; }
  .portal-ad-slots { grid-template-columns: 1fr; }
  .portal-ad-form { padding: 15px; grid-template-columns: 1fr; }
  .portal-ad-form > label, .portal-ad-field-wide { grid-column: 1; }
  .portal-ad-upload > div { grid-template-columns: 1fr; }
  .portal-ad-form-actions { align-items: stretch; flex-direction: column; }
  .portal-ad-form-actions button { width: 100%; }
}
