/* =====================================================================
   Pangandoy SMS - custom styles (AdminLTE 3)
   ===================================================================== */
:root { --psp-primary: #3c8dbc; --psp-accent: #f1c40f; --psp-dark: #2c3b4e; }

body { font-family: 'Source Sans Pro', 'Segoe UI', Arial, sans-serif; }

/* ---------- Theme ---------- */
.main-sidebar, .main-sidebar .brand-link { background: var(--psp-dark) !important; }
.main-sidebar .brand-link { color: #fff !important; border-bottom: 1px solid rgba(255,255,255,.08); }
.brand-link .brand-image { max-height: 33px; width: 33px; }
.nav-sidebar > .nav-item > .nav-link.active,
.nav-treeview > .nav-item > .nav-link.active { background: var(--psp-primary) !important; color: #fff !important; }
.nav-sidebar .nav-header { color: var(--psp-accent) !important; font-size: .72rem; letter-spacing: .08em; padding-top: 1rem; }
.bg-psp { background: var(--psp-primary) !important; color: #fff !important; }
.text-psp { color: var(--psp-primary) !important; }
.accent-text, .accent { color: var(--psp-accent); }

.btn-primary { background: var(--psp-primary); border-color: var(--psp-primary); }
.btn-primary:hover, .btn-primary:focus { filter: brightness(.92); background: var(--psp-primary); border-color: var(--psp-primary); }
.btn-gold { background: var(--psp-accent); color: var(--psp-dark); border: 0; }
.btn-gold:hover { filter: brightness(.95); color: var(--psp-dark); }

.small-box .icon { opacity: .25; }
.small-box.bg-primary { background: var(--psp-primary) !important; }
.card-title { font-weight: 600; }
.card-primary:not(.card-outline) > .card-header,
.card-header.bg-primary { background: var(--psp-primary) !important; }
.card-primary.card-outline { border-top-color: var(--psp-primary); }
.card-header.bg-gold { background: var(--psp-accent) !important; color: var(--psp-dark) !important; }
.card-header.bg-gold .card-title { color: var(--psp-dark); }
.dashboard-stat { transition: transform .2s; }
.dashboard-stat:hover { transform: translateY(-3px); }
.required-asterisk, .req { color: #d9534f; }
.table td, .table th { vertical-align: middle; }
.table-xs td, .table-xs th { padding: .35rem .5rem; font-size: .9rem; }

/* ---------- Login & landing ---------- */
.login-page { background: linear-gradient(135deg, var(--psp-primary) 0%, var(--psp-dark) 100%); }
.login-box { width: 400px; max-width: 90%; }
.login-logo img { max-height: 60px; }
.login-card-body { border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.15); }
.landing-hero { background: linear-gradient(135deg, var(--psp-primary) 0%, var(--psp-dark) 100%); color: #fff; padding: 80px 0; }
.landing-hero img.logo { max-height: 80px; }
.application-form-page { background: #f4f6f9; padding: 30px 0; }
.application-form-card { background: #fff; border-radius: 8px; box-shadow: 0 4px 20px rgba(0,0,0,.08); padding: 30px; margin-bottom: 30px; }
.form-section-title { border-left: 4px solid var(--psp-accent); padding-left: 10px; margin-bottom: 15px; color: var(--psp-dark); font-weight: 600; }

/* ---------- Photos ---------- */
.applicant-photo { width: 120px; height: 150px; object-fit: cover; border: 2px solid var(--psp-primary); border-radius: 4px; }
.profile-photo { width: 150px; height: 150px; object-fit: cover; border-radius: 50%; border: 3px solid var(--psp-accent); margin: 0 auto; }
.person-photo { width: 130px; height: 130px; object-fit: cover; border-radius: 50%; border: 3px solid var(--psp-accent); background: #f4f6f9; display: inline-flex; align-items: center; justify-content: center; }
.person-photo-sm { width: 40px; height: 40px; object-fit: cover; border-radius: 50%; border: 2px solid #ddd; background: #f4f6f9; display: inline-flex; align-items: center; justify-content: center; }
.document-thumb { width: 60px; height: 60px; object-fit: cover; border: 1px solid #ccc; }

/* ---------- Status badges ---------- */
.status-badge { display: inline-block; padding: 3px 9px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.status-draft { background: #eee; color: #666; }
.status-submitted { background: #d9edf7; color: #31708f; }
.status-under-review { background: #fcf8e3; color: #8a6d3b; }
.status-for-interview { background: #fff3cd; color: #856404; }
.status-for-deliberation { background: #f8d7da; color: #721c24; }
.status-approved { background: #d4edda; color: #155724; }
.status-waitlisted { background: #e2e3e5; color: #383d41; }
.status-rejected { background: #f8d7da; color: #721c24; }
.status-archived { background: #ddd; color: #555; }
.status-active { background: #d4edda; color: #155724; }
.status-inactive { background: #e2e3e5; color: #383d41; }
.status-graduated { background: #cce5ff; color: #004085; }
.status-probation, .status-on-probation { background: #fff3cd; color: #856404; }
.status-suspended { background: #f8d7da; color: #721c24; }
.status-terminated { background: #d9534f; color: #fff; }
.status-withdrawn { background: #ddd; color: #555; }
/* accounting */
.status-received { background: #d4edda; color: #155724; }
.status-pending { background: #fff3cd; color: #856404; }
.status-released { background: #cce5ff; color: #004085; }
.status-cancelled, .status-voided { background: #f8d7da; color: #721c24; text-decoration: line-through; }
.status-converted { background: #d1ecf1; color: #0c5460; }
.status-not-yet-converted { background: #fff3cd; color: #856404; }

/* ---------- Accounting ---------- */
.amount { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount-in { color: #1e7e34; font-weight: 600; }
.amount-out { color: #c82333; font-weight: 600; }
.balance-box { border-left: 4px solid var(--psp-primary); background: #f8fafc; padding: 12px 16px; border-radius: 4px; }
.balance-box .value { font-size: 1.6rem; font-weight: 700; color: var(--psp-dark); }
.fund-progress { height: 8px; }
.info-box .info-box-number { font-size: 1.15rem; }
tr.row-cancelled td { color: #999; text-decoration: line-through; }

/* ---------- Foundation / trustees ---------- */
.trustee-card { text-align: center; border-top: 3px solid var(--psp-accent); transition: transform .2s; height: 100%; }
.trustee-card:hover { transform: translateY(-3px); }
.trustee-card .position { color: var(--psp-primary); font-weight: 700; text-transform: uppercase; font-size: .78rem; letter-spacing: .05em; }
.founder-hero { background: linear-gradient(135deg, var(--psp-primary), var(--psp-dark)); color: #fff; border-radius: 6px; padding: 24px; }
.founder-hero .person-photo { width: 150px; height: 150px; border-color: #fff; }
.founder-hero blockquote { border-left: 4px solid var(--psp-accent); padding-left: 12px; font-style: italic; margin: 12px 0 0; }

/* ---------- Filters ---------- */
.filter-bar { background: #f4f6f9; padding: 12px; border-radius: 4px; margin-bottom: 15px; }
.filter-bar .form-control { display: inline-block; width: auto; margin-right: 8px; margin-bottom: 4px; }
@media (max-width: 768px) {
  .filter-bar .form-control { display: block; width: 100%; margin-right: 0; margin-bottom: 8px; }
}

/* ---------- Print (in-app pages) ---------- */
.print-form { max-width: 850px; margin: 0 auto; background: #fff; padding: 30px; box-shadow: 0 0 8px rgba(0,0,0,.1); }
@media print {
  .no-print, .main-header, .main-sidebar, .main-footer, .control-sidebar, .card-tools, .btn, form.filter-bar { display: none !important; }
  .content-wrapper { margin-left: 0 !important; background: #fff !important; }
  .card { box-shadow: none !important; border: 0 !important; }
  body { background: #fff; }
}
.status-verified { background: #d4edda; color: #155724; }
.status-incomplete { background: #fde2c8; color: #8a4b08; }
.status-resigned, .status-term-ended { background: #e2e3e5; color: #383d41; }

/* =====================================================================
   v2.1 - USER AVATARS, THEME PICKER, WEBSITE EDITOR
   ===================================================================== */
.user-avatar{border-radius:50%; object-fit:cover; display:inline-block; vertical-align:middle; border:2px solid rgba(255,255,255,.6); background:#fff}
.user-avatar-ini{display:inline-flex; align-items:center; justify-content:center; font-weight:700; color:#fff; background:var(--psp-primary); border-color:var(--psp-accent)}
.user-panel .image .user-avatar{margin-top:2px}
.navbar .user-menu .dropdown-menu .user-header{height:auto; padding-bottom:12px}
.navbar .user-menu .dropdown-menu .user-header .user-avatar{border:3px solid rgba(255,255,255,.4)}
.profile-photo-lg{width:150px; height:150px; border-radius:50%; object-fit:cover; border:4px solid var(--psp-accent)}
.theme-menu{min-width:250px}
.theme-swatches{display:grid; grid-template-columns:repeat(6, 1fr); gap:8px}
.theme-swatch{width:32px; height:32px; border-radius:50%; border:2px solid rgba(0,0,0,.1); cursor:pointer; padding:0; display:grid; place-items:center; transition:transform .15s}
.theme-swatch:hover{transform:scale(1.12)}
.theme-swatch i{color:#fff; font-size:12px; opacity:0; text-shadow:0 0 3px rgba(0,0,0,.6)}
.theme-swatch.active{border-color:var(--psp-accent); box-shadow:0 0 0 2px var(--psp-primary)}
.theme-swatch.active i{opacity:1}
.profile-theme-option{border:2px solid transparent; border-radius:10px; padding:8px; cursor:pointer; text-align:center; transition:border-color .15s}
.profile-theme-option.active{border-color:var(--psp-primary)}
.profile-theme-option .bar{height:34px; border-radius:6px; margin-bottom:4px}
.icon-choice{cursor:pointer; margin:0 6px 6px 0}
.icon-choice input{display:none}
.icon-choice span{display:grid; place-items:center; width:42px; height:42px; border:1px solid #ccd; border-radius:10px; color:#1d6b66}
.icon-choice input:checked + span{border-color:var(--psp-primary); background:var(--psp-primary); color:#fff}
.icon-choice svg,.site-icon-preview svg{width:22px; height:22px; stroke:currentColor; fill:none; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round}
.site-icon-preview{color:#1d6b66}
.bg-psp, .user-header.bg-psp{background:var(--psp-primary) !important}
a{color:var(--psp-primary)}
a:hover{color:var(--psp-primary); filter:brightness(.85)}
.page-item.active .page-link{background:var(--psp-primary); border-color:var(--psp-primary)}
.custom-control-input:checked ~ .custom-control-label::before{background:var(--psp-primary); border-color:var(--psp-primary)}
.nav-pills .nav-link.active{background:var(--psp-primary)}

/* =====================================================================
   DARK MODE (AdminLTE .dark-mode + custom parts of this system)
   ===================================================================== */
.dark-mode{color-scheme:dark}
.dark-mode .content-wrapper{background:#1b2027}
.dark-mode .filter-bar{background:#2a3038}
.dark-mode .balance-box{background:#2a3038; color:#e9ecef}
.dark-mode .balance-box .value{color:#fff}
.dark-mode .table .thead-light th,.dark-mode .bg-light,.dark-mode tfoot.bg-light,.dark-mode tr.bg-light td{background:#2f353d !important; color:#e9ecef}
.dark-mode .table-info, .dark-mode .table-info td{background:#203643 !important; color:#e9ecef}
.dark-mode .alert-light{background:#2a3038; color:#dee2e6; border-color:#3f474f}
.dark-mode .callout{background:#2a3038; color:#dee2e6}
.dark-mode .callout a{color:#9fd3ff}
.dark-mode .person-photo,.dark-mode .person-photo-sm{background:#2a3038; border-color:var(--psp-accent)}
.dark-mode .card.trustee-card{background:#343a40}
.dark-mode .card-footer.bg-white{background:#343a40 !important}
.dark-mode .form-control:disabled,.dark-mode .form-control[readonly]{background:#2a3038}
.dark-mode .icon-choice span{border-color:#4b545c; color:#8fd3cc}
.dark-mode .site-icon-preview{color:#8fd3cc}
.dark-mode a:not(.btn):not(.nav-link):not(.dropdown-item):not(.page-link):not(.small-box-footer){color:#8cc4ff}
.dark-mode .text-dark{color:#e9ecef !important}
.dark-mode .main-footer{background:#22272e; border-top-color:#3f474f; color:#adb5bd}
.dark-mode .status-badge{filter:brightness(.92)}
.dark-mode .print-form{background:#343a40}
.dark-mode .theme-menu{background:#343a40}
.dark-mode .profile-theme-option{color:#dee2e6}
