/*
 * LUPii admin button system.
 * Loaded only by the authenticated management screen and intentionally scoped
 * below .app-shell so public entry pages cannot be affected.
 */
.app-shell .view .primary-button,
.app-shell .view .secondary-button{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:10px;
  padding:0 15px;
  font-weight:800;
  line-height:1.2;
  letter-spacing:.01em;
  text-decoration:none;
  white-space:nowrap;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease,border-color .16s ease,color .16s ease,filter .16s ease;
}

.app-shell .view .primary-button{
  border:1px solid #08786f;
  background:linear-gradient(135deg,#1aa195 0%,#087a70 100%);
  color:#fff;
  box-shadow:0 7px 16px rgba(8,122,112,.19),inset 0 1px rgba(255,255,255,.18);
}

.app-shell .view .primary-button:hover{
  background:linear-gradient(135deg,#21ad9f 0%,#086d65 100%);
  transform:translateY(-1px);
  box-shadow:0 10px 21px rgba(8,122,112,.24),inset 0 1px rgba(255,255,255,.2);
}

.app-shell .view .secondary-button{
  border:1px solid #bdcfdd;
  background:linear-gradient(180deg,#fff 0%,#f4f8fb 100%);
  color:#2e5876;
  box-shadow:0 4px 11px rgba(38,75,103,.09),inset 0 1px rgba(255,255,255,.9);
}

.app-shell .view .secondary-button:hover{
  border-color:#82a9c3;
  background:linear-gradient(180deg,#fff 0%,#eaf3f9 100%);
  color:#1e4f70;
  transform:translateY(-1px);
  box-shadow:0 7px 15px rgba(38,75,103,.14);
}

.app-shell .view .primary-button:active,
.app-shell .view .secondary-button:active{
  transform:translateY(0);
  box-shadow:0 3px 8px rgba(35,67,88,.12);
}

.app-shell .view .primary-button:focus-visible,
.app-shell .view .secondary-button:focus-visible,
.app-shell .view .text-button:focus-visible,
.app-shell .view .square-button:focus-visible{
  outline:3px solid rgba(35,130,246,.22);
  outline-offset:2px;
}

.app-shell .view .primary-button:disabled,
.app-shell .view .secondary-button:disabled{
  border-color:#d8e0e3;
  background:#e9edef;
  color:#93a09d;
  box-shadow:none;
  filter:none;
  transform:none;
  cursor:not-allowed;
}

/* Main page actions get slightly stronger hierarchy than table-row controls. */
.app-shell .section-heading>.primary-button,
.app-shell .section-heading>.secondary-button,
.app-shell .section-heading>.top-actions .primary-button,
.app-shell .section-heading>.top-actions .secondary-button,
.app-shell .dashboard-head-actions .primary-button,
.app-shell .dashboard-head-actions .secondary-button{
  min-height:48px;
  padding:0 18px;
  border-radius:11px;
}

.app-shell .section-heading>.top-actions:not(.account-action-bar){
  gap:9px;
  padding:7px;
  border:1px solid #e2eaf0;
  border-radius:14px;
  background:linear-gradient(180deg,#fff,#f8fafc);
  box-shadow:0 8px 22px rgba(26,57,80,.07);
}

/* A compact plus badge visually identifies create/add actions. */
.app-shell #dashboardView [data-go="broadcast"]::before,
.app-shell #addRoute::before,
.app-shell #addAdvertisingSource::before,
.app-shell #newResponseForm::before,
.app-shell #newBookingService::before,
.app-shell #newManualReservation::before,
.app-shell #addTag::before,
.app-shell #addStaff::before,
.app-shell #addTemplate::before,
.app-shell #addAdminUser::before{
  content:"+";
  width:20px;
  height:20px;
  flex:0 0 20px;
  display:inline-grid;
  place-items:center;
  border-radius:50%;
  background:rgba(255,255,255,.2);
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.32);
  font-size:16px;
  line-height:1;
  font-weight:700;
}

.app-shell #newManualReservation::before,
.app-shell #addStaff::before,
.app-shell #addAdminUser::before{
  background:#e8f2f8;
  color:#2a6389;
  box-shadow:inset 0 0 0 1px #bfd3df;
}

.app-shell #changePassword::before{
  content:"●";
  width:18px;
  height:18px;
  display:inline-grid;
  place-items:center;
  border:1px solid #b7ccd9;
  border-radius:5px;
  color:#4b7995;
  font-size:7px;
  box-shadow:inset 0 5px 0 #edf5fa;
}

.app-shell .export-actions .secondary-button::before,
.app-shell .panel-head [data-export]::before{
  content:"↓";
  width:20px;
  height:20px;
  display:inline-grid;
  place-items:center;
  border-radius:6px;
  background:#e8f2f8;
  color:#2a6389;
  font-size:13px;
  font-weight:900;
}

/* Secondary actions stay quiet but no longer look like plain text controls. */
.app-shell .view .text-button{
  min-height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1px solid transparent;
  border-radius:8px;
  padding:0 10px;
  color:#08786e;
  transition:background .16s ease,border-color .16s ease,color .16s ease;
}

.app-shell .view .text-button:hover{
  border-color:#c2e1dc;
  background:#edf8f6;
  color:#075e57;
}

.app-shell .view .square-button{
  border-color:#b9cedd;
  background:linear-gradient(180deg,#fff,#eef6fb);
  color:#2b6388;
  box-shadow:0 4px 10px rgba(38,75,103,.1);
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}

.app-shell .view .square-button:hover{
  background:#e4f1f8;
  transform:translateY(-1px);
  box-shadow:0 7px 14px rgba(38,75,103,.14);
}

.app-shell .view .refresh-button{
  min-width:88px;
  color:#245b7a;
}

.app-shell .view .refresh-button.is-loading{
  opacity:.7;
  cursor:wait;
  transform:none;
}

.app-shell .panel-head .primary-button,
.app-shell .panel-head .secondary-button{
  min-height:38px;
  padding:0 13px;
}

.app-shell .dialog-actions .primary-button,
.app-shell .dialog-actions .secondary-button{
  min-width:92px;
}

.app-shell .broadcast-actions{
  align-items:center;
}

.app-shell .broadcast-actions .primary-button,
.app-shell .broadcast-actions .secondary-button{
  min-height:46px;
  padding-inline:19px;
}

/* Friend profile actions: visual enhancement only; JS data attributes remain unchanged. */
.app-shell #friendsView .profile-actions{
  gap:10px;
}

.app-shell #friendsView .profile-actions [data-open-chat],
.app-shell #friendsView .profile-actions [data-save]{
  min-height:46px;
  padding-inline:17px;
  border-radius:11px;
  font-size:14px;
  box-shadow:0 7px 17px rgba(31,69,96,.12);
}

.app-shell #friendsView .profile-actions [data-open-chat]::before,
.app-shell #friendsView .profile-actions [data-save]::before,
.app-shell #accountsView #accountRows .table-actions .tiny-button::before{
  content:"";
  width:18px;
  height:18px;
  flex:0 0 18px;
  background:currentColor;
  -webkit-mask:var(--lupii-action-icon) center/contain no-repeat;
  mask:var(--lupii-action-icon) center/contain no-repeat;
}

.app-shell #friendsView .profile-actions [data-open-chat]{
  --lupii-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M21 11.5a8.3 8.3 0 0 1-9 8.2 9.7 9.7 0 0 1-3.7-.9L3 21l1.7-4.7A8.2 8.2 0 1 1 21 11.5Z' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.app-shell #friendsView .profile-actions [data-save]{
  --lupii-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h12l3 3v15H4V3h1Zm3 0v6h8V3M8 21v-7h8v7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

/* LINE account row controls: scoped here so other compact table buttons are unaffected. */
.app-shell #accountsView #accountRows .table-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  flex-wrap:nowrap;
  gap:7px;
  min-width:max-content;
}

.app-shell #accountsView #accountRows .table-actions .tiny-button{
  min-height:40px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:0 11px;
  border:1px solid #d8e2eb;
  border-radius:9px;
  background:linear-gradient(180deg,#fff 0%,#f1f5f8 100%);
  color:#294158;
  box-shadow:0 4px 10px rgba(31,58,81,.08),inset 0 1px rgba(255,255,255,.9);
  font-size:12px;
  font-weight:800;
  line-height:1;
  white-space:nowrap;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease;
}

.app-shell #accountsView #accountRows .table-actions .tiny-button:hover{
  border-color:#aabcca;
  background:linear-gradient(180deg,#fff 0%,#e8eff4 100%);
  color:#1f374c;
  transform:translateY(-1px);
  box-shadow:0 7px 14px rgba(31,58,81,.13),inset 0 1px rgba(255,255,255,.95);
}

.app-shell #accountsView #accountRows [data-billing-account]{
  --lupii-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m3 7 4 4 5-8 5 8 4-4-2 12H5L3 7Zm2 12h14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  border-color:#ffc47c!important;
  background:linear-gradient(180deg,#fffaf4 0%,#fff0dd 100%)!important;
  color:#a44d0b!important;
}

.app-shell #accountsView #accountRows [data-rich-menu-account]{
  --lupii-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 4h6v6H4V4Zm10 0h6v6h-6V4ZM4 14h6v6H4v-6Zm10 0h6v6h-6v-6Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
  border-color:#a9ded8;
  background:linear-gradient(180deg,#f8fffe 0%,#e9f8f6 100%);
  color:#08796f;
}

.app-shell #accountsView #accountRows [data-connect-account]{
  --lupii-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m9.5 14.5 5-5M7 17l-1 1a3.5 3.5 0 0 1-5-5l4-4a3.5 3.5 0 0 1 5 0M17 7l1-1a3.5 3.5 0 0 1 5 5l-4 4a3.5 3.5 0 0 1-5 0' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.app-shell #accountsView #accountRows [data-edit-account]{
  --lupii-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m4 20 4.5-1L20 7.5 16.5 4 5 15.5 4 20Zm10.5-14 3.5 3.5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.app-shell #accountsView #accountRows [data-clone-account]{
  --lupii-action-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='8' y='8' width='12' height='12' rx='2' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M16 8V6a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8a2 2 0 0 0 2 2h2' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
}

@media(max-width:760px){
  .app-shell #reservationsView .section-heading,
  .app-shell #settingsView .section-heading{
    flex-direction:column;
    gap:12px;
  }
  .app-shell .section-heading>.top-actions:not(.account-action-bar){
    width:100%;
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .app-shell .section-heading>.top-actions .primary-button,
  .app-shell .section-heading>.top-actions .secondary-button{
    width:100%;
    min-width:0;
    padding-inline:10px;
    white-space:nowrap;
    text-align:center;
  }
  .app-shell .view .primary-button,
  .app-shell .view .secondary-button{
    min-height:44px;
  }
  .app-shell .dialog-actions .primary-button,
  .app-shell .dialog-actions .secondary-button{
    min-width:0;
  }
  .app-shell #accountsView #accountRows .table-actions .tiny-button{
    min-height:38px;
    padding-inline:9px;
  }
}

@media(prefers-reduced-motion:reduce){
  .app-shell .view .primary-button,
  .app-shell .view .secondary-button,
  .app-shell .view .text-button,
  .app-shell .view .square-button{
    transition:none;
  }
}

/* タグのアーカイブと管理画面ユーザーの停止 */
#tagRows .tiny-button.management-danger, #adminUserRows .tiny-button.management-danger { color: #b4233b; border-color: #e5a7b3; background: #fff3f5; }
#tagRows .tiny-button.management-danger:hover, #adminUserRows .tiny-button.management-danger:hover { background: #ffe7ec; }
