/*
 * Govt. Model College, Balipara - admin panel additions on top of the
 * AppDashboard theme (assets/admin/css/main.css). Only small, GMC-specific bits.
 */

/* ---------- brand marks ---------- */
.sidebar-logo-mark img,
.header-logo-mark img,
.footer-brand-mark img { object-fit: contain; }
.gmc-logo-mark { background: #fff !important; border-radius: var(--radius-md); padding: 3px; }
.gmc-logo-mark img { width: 100%; height: 100%; object-fit: contain; }

/* user avatar (initial letter instead of a photo) */
.gmc-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--accent-color), transparent 85%);
  color: var(--accent-color); font-weight: 700; font-size: 0.95rem; flex-shrink: 0;
}
.dropdown-header .gmc-avatar { width: 44px; height: 44px; margin-bottom: 6px; }

/* ---------- page layout ---------- */
.gmc-page .page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: .5rem 1rem; }
.gmc-card { margin-bottom: var(--spacing-lg); }
.gmc-card .card-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; }
.gmc-card .card-header .card-title { display: flex; align-items: center; gap: .5rem; margin: 0; }
.gmc-card .card-header .card-title .count { font-weight: 500; color: var(--muted-color); font-size: .9em; }
.gmc-card .card-header .card-title i { color: var(--accent-color); }
.gmc-card .card-subtitle { margin: .25rem 0 0; }
.gmc-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.gmc-help { color: var(--muted-color); font-size: .875rem; }

/* ---------- tables ---------- */
.gmc-table { margin-bottom: 0; }
.gmc-table > :not(caption) > * > * { vertical-align: middle; }
.gmc-table th { white-space: nowrap; }
.gmc-table td.sl, .gmc-table th.sl { width: 56px; color: var(--muted-color); }
.gmc-table td.actions { white-space: nowrap; width: 1%; }
.gmc-table td.actions form { display: inline; }
.gmc-table img.thumb { width: 88px; height: 54px; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--border-color); }
.gmc-table img.thumb-portrait { width: 44px; height: 56px; object-fit: cover; object-position: top; border-radius: var(--radius-sm); border: 1px solid var(--border-color); }
.gmc-empty { text-align: center; color: var(--muted-color); padding: 2.5rem 1rem !important; }
.gmc-empty i { font-size: 1.75rem; display: block; margin-bottom: .35rem; opacity: .6; }
.gmc-status { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .78rem; padding: .3rem .6rem; border-radius: var(--radius-full); }
.gmc-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.gmc-status.on { color: #0f8a5f; background: color-mix(in srgb, #10b981, transparent 86%); }
.gmc-status.off { color: var(--muted-color); background: color-mix(in srgb, var(--muted-color), transparent 88%); }
[data-theme=dark] .gmc-status.on { color: #34d399; }
.gmc-filter { display: flex; align-items: center; gap: .5rem; }
.gmc-filter .form-select { min-width: 220px; }
.gmc-pager { padding: var(--spacing-md) var(--spacing-lg); border-top: 1px solid var(--border-color); }
.gmc-pager .pagination { margin: 0; flex-wrap: wrap; }

/* ---------- forms ---------- */
.gmc-form .form-label .req { color: #dc2626; }
.gmc-current-file { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 1rem; margin-top: .75rem; padding: .75rem; border: 1px dashed var(--border-color); border-radius: var(--radius-md); }
.gmc-current-file img { max-width: 180px; max-height: 180px; border-radius: var(--radius-sm); }
.gmc-form-actions { display: flex; flex-wrap: wrap; gap: .5rem; padding-top: .5rem; }
.gmc-side-note ol { padding-left: 1.1rem; margin: 0; }
.gmc-side-note li { margin-bottom: .5rem; }

/* ---------- dashboard ---------- */
.page-dashboard .dashboard-kpi-card { text-decoration: none; color: inherit; transition: transform var(--transition-fast), box-shadow var(--transition-fast); }
.page-dashboard a.dashboard-kpi-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.gmc-count-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: var(--spacing-md); margin-bottom: var(--spacing-xl); }
.gmc-count-grid .dashboard-kpi-card { display: flex; align-items: center; gap: var(--spacing-md); }
.gmc-list-item { display: flex; gap: .75rem; align-items: flex-start; padding: .85rem var(--spacing-lg); border-bottom: 1px solid var(--border-color); text-decoration: none; color: inherit; }
.gmc-list-item:last-child { border-bottom: 0; }
.gmc-list-item:hover { background: color-mix(in srgb, var(--accent-color), transparent 95%); }
.gmc-list-item strong { display: block; color: var(--heading-color); font-weight: 600; line-height: 1.35; word-break: break-word; }
.gmc-list-item small { color: var(--muted-color); }
.gmc-list-item .dashboard-activity-icon { flex-shrink: 0; }

/* ---------- message view ---------- */
.gmc-message-body { white-space: pre-wrap; word-break: break-word; line-height: 1.65; }

/* ---------- login ---------- */
.gmc-auth .auth-logo img { background: #fff; border-radius: var(--radius-md); padding: 3px; width: 44px; height: 44px; object-fit: contain; }
.gmc-auth .auth-logo span { line-height: 1.2; }
.gmc-auth .auth-logo small { display: block; font-weight: 500; opacity: .8; font-size: .75rem; letter-spacing: .02em; }
.gmc-auth .alert { display: flex; gap: .5rem; align-items: flex-start; }

@media (max-width: 575px) {
  .gmc-filter { width: 100%; }
  .gmc-filter .form-select { min-width: 0; flex: 1; }
  .gmc-card .card-header .btn { width: 100%; justify-content: center; }
  .gmc-card .card-header .gmc-toolbar { width: 100%; }
}

/* dashboard: panels keep their own height */
.page-dashboard .dashboard-workbench { align-items: start; }
