/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 */

:root {
  --bg: #0b1224;
  --bg-accent: #0f162b;
  --card: #111a31;
  --border: #1f2a44;
  --muted: #93a3bf;
  --text: #e8edf7;
  --primary: #6dd3ff;
  --primary-strong: #3eb6f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

.app-body {
  min-height: 100vh;
  background:
    radial-gradient(120% 120% at 20% 20%, #123469 0%, transparent 40%),
    radial-gradient(100% 100% at 80% 0%, #0f9ada 0%, transparent 35%),
    linear-gradient(180deg, #0b1224 0%, #0a0f1c 100%);
}

.site-header {
  position: relative;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  background:
    radial-gradient(1px 1px at 20% 30%, rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0)) repeat,
    radial-gradient(1px 1px at 70% 40%, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0)) repeat,
    linear-gradient(145deg, #0f162b, #0c1323);
  background-size: auto, auto, 100% 100%;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

.site-header a {
  color: var(--text);
  text-decoration: none;
}

/* Changed summary to pure black */
.site-header summary {
  color: #000000;
  cursor: pointer;
}

.site-header .menu-items {
  background: #ffffff !important;
  color: #000000 !important;
}

/* Links and Buttons inside the menu */
.site-header .menu-items a,
.site-header .menu-items button {
  color: #000000 !important; /* Pure Black */
  font-weight: 600;
  text-decoration: none !important;
  opacity: 1 !important; /* Prevents text from looking faded */
}

/* Ensuring visited/link states don't change the color back to blue/purple */
.site-header .menu-items a:visited,
.site-header .menu-items a:link {
  color: #000000 !important;
}

.site-header .menu-items button {
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  cursor: pointer;
}

/* Hover state for items */
.site-header .menu-items a:hover,
.site-header .menu-items button:hover {
  background: #e7edf7;
  color: #000000 !important;
}

.page-body {
  background: linear-gradient(180deg, rgba(17, 26, 49, 0.8) 0%, rgba(12, 19, 35, 0.6) 100%);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.site-header summary,
.site-header summary:focus,
.site-header summary:hover {
  outline: none;
}

.upload-card {
  background: rgba(15, 22, 43, 0.72);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.35);
}

.upload-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.upload-dropzone {
  border: 2px dashed rgba(109, 211, 255, 0.5);
  background: rgba(12, 20, 38, 0.75);
  border-radius: 12px;
  padding: 28px 18px;
  text-align: center;
  transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.upload-dropzone.active {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(63, 182, 245, 0.35);
}

.upload-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-weight: 600;
}

.upload-browse {
  background: rgba(12, 20, 38, 0.75);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px;
  text-align: center;
}

.upload-browse-btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #0a0f1c;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(63, 182, 245, 0.35);
}

.upload-action-btn {
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(17, 26, 49, 0.8);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.upload-action-btn.confirm {
  background: linear-gradient(135deg, #54c472 0%, #32a65a 100%);
  border: none;
  color: #0a0f1c;
  box-shadow: 0 8px 22px rgba(50, 166, 90, 0.3);
}

.upload-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.frame-card-select {
  transition: all 0.18s ease;
}

.frame-card-select.selected {
  border-color: #6dd3ff;
  box-shadow: 0 8px 20px rgba(63, 182, 245, 0.35);
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #0a0f1c;
}

/* --- RE-FIXED APPROVAL SECTION --- */
.approval-card {
  min-height: 360px;
  display: flex;
  flex-direction: column;
}

.approval-actions {
  display: flex !important;
  justify-content: center !important;
  gap: 16px !important;
  margin-top: auto;
  padding-top: 20px;
  width: 100%;
}

/* SCOPED: Target only forms inside approval cards to fix width */
.approval-card .approval-actions form {
  flex: 0 0 48%;
  max-width: 48%;
  display: block;
}

.approval-btn {
  width: 100% !important; /* Fills the 42% form wrapper */
  padding: 14px 0;
  font-size: 15px;
  border-radius: 10px;
  border: none;
  font-weight: 700;
  color: #0a0f1c;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
  text-align: center;
  transition: transform 0.1s ease;
}

.approval-btn:active {
  transform: scale(0.98);
}

.approval-btn.approve {
  background: linear-gradient(135deg, #54c472 0%, #32a65a 100%);
  box-shadow: 0 8px 22px rgba(50, 166, 90, 0.35);
}

.approval-btn.reject {
  background: linear-gradient(135deg, #f87171 0%, #ef4444 100%);
  box-shadow: 0 8px 22px rgba(239, 68, 68, 0.35);
  color: #1f0c0c;
}

.google-signin-btn {
  width: 100%;
  border: none;
  padding: 10px 14px;
  border-radius: 10px;
  font-weight: 700;
  color: #0a0f1c;
  background: linear-gradient(135deg, #54c472 0%, #32a65a 100%);
  box-shadow: 0 10px 24px rgba(50, 166, 90, 0.35);
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.1s ease, filter 0.15s ease;
}

.google-signin-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(50, 166, 90, 0.4);
  filter: brightness(1.05);
}

.google-signin-btn:active {
  transform: translateY(0);
  box-shadow: 0 8px 20px rgba(50, 166, 90, 0.25);
}

/* --- CONTINUING REST OF FILE --- */

.upload-preview-grid {
  margin-top: 20px;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.upload-file-list {
  margin-top: 14px;
  color: #e8edf7;
}

.file-pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.file-pill {
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 13px;
}

.upload-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0c1426;
  aspect-ratio: 4 / 3;
}

.upload-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #0c1426;
}

.upload-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 10px;
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #1f2a44, #162038);
  font-size: 13px;
  word-break: break-all;
}

.upload-remove {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 6px 10px;
  border: none;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}

.modal-content {
  position: relative;
  background: #0b1224;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-content img {
  max-width: 80vw;
  max-height: 80vh;
  display: block;
  object-fit: contain;
  border-radius: 8px;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
}

.frames-shell {
  background: rgba(12, 20, 38, 0.6);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.35);
}

.frames-sidebar {
  background: rgba(12, 20, 38, 0.8);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  color: var(--text);
}

.frames-main {
  min-height: 420px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.sidebar-add {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
  color: #0a0f1c;
  font-weight: 700;
  text-decoration: none;
  font-size: 13px;
}

.frames-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 520px;
  overflow-y: auto;
}

.frame-item {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(17, 26, 49, 0.6);
  color: var(--text);
  text-decoration: none;
}

.frame-item .frame-name {
  font-weight: 700;
}

.frame-item .frame-email {
  font-size: 12px;
  color: var(--muted);
}

.frame-item.active {
  border-color: var(--primary);
  box-shadow: 0 8px 20px rgba(63, 182, 245, 0.25);
}

.frame-card {
  background: rgba(15, 22, 43, 0.72);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px;
  color: var(--text);
}

.form-label {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
  font-size: 13px;
}

.form-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0c1426;
  color: var(--text);
}

.otp-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #6dd3ff !important;
  background: #0e1529 !important;
  color: #ffffff !important;
  caret-color: #ffffff;
  text-align: center;
  font-size: 22px;
  letter-spacing: 0.2em;
  box-shadow: 0 6px 14px rgba(63, 182, 245, 0.25);
}

.otp-input::placeholder {
  color: #9fb6d1;
}

.form-select {
  width: 100%;
  min-height: 44px;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #0c1426;
  color: var(--text);
}

.perm-board .perm-column {
  background: rgba(17, 26, 49, 0.7);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.perm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.perm-title {
  color: var(--text);
  font-weight: 700;
}

.perm-hint {
  color: var(--muted);
  font-size: 12px;
}

.perm-list {
  min-height: 180px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(12, 20, 38, 0.65);
}

.perm-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  cursor: grab;
  user-select: none;
}

.perm-pill span {
  font-size: 13px;
}
