/* ============================================================
   @origin    DMDEV — DhaMus Digital Works
   @author    DhaMus <dev@dhamus.id>
   @location  AtJeh, Indonesia
   @year      2026
   @rights    Proprietary — all rights reserved
   ============================================================ */

/* ===== CSS Variables / Design Tokens ===== */
:root {
    --dm-deep: #0a0e1a;
    --dm-surface: #0f1629;
    --dm-card: #131c33;
    --dm-card-hover: #182544;
    --dm-border: rgba(56, 189, 248, 0.08);
    --dm-border-light: rgba(56, 189, 248, 0.15);
    --dm-glass: rgba(13, 20, 40, 0.75);
    --dm-glass-border: rgba(56, 189, 248, 0.12);
    --dm-ocean: #0ea5e9;
    --dm-ocean-light: #38bdf8;
    --dm-ocean-dark: #0284c7;
    --dm-indigo: #6366f1;
    --dm-indigo-light: #818cf8;
    --dm-text: #e2e8f0;
    --dm-text-muted: #94a3b8;
    --dm-text-dim: #64748b;
    --dm-success: #10b981;
    --dm-danger: #ef4444;
    --dm-warning: #f59e0b;
    --dm-radius: 12px;
    --dm-radius-lg: 16px;
    --dm-radius-sm: 8px;
    --dm-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
    --dm-shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);
    --dm-transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: 'Inter', system-ui, -apple-system, sans-serif; line-height: 1.6; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ===== UTILITY ===== */
.bg-dm-deep { background: var(--dm-deep); }
.font-sans { font-family: 'Inter', system-ui, -apple-system, sans-serif; }
.text-white { color: var(--dm-text); }
.text-sky-400 { color: var(--dm-ocean-light) !important; }
.antialiased { -webkit-font-smoothing: antialiased; }
.opacity-60 { opacity: 0.55; }
.hidden { display: none !important; }

/* ===== HEADER (Glassmorphism) ===== */
.dm-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--dm-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--dm-glass-border);
}

.dm-header-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    gap: 32px;
}

/* Logo */
.dm-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.dm-logo-icon { width: 32px; height: 32px; }
.dm-logo-text {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--dm-text);
}

/* Nav */
.dm-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}
.dm-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: var(--dm-radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--dm-text-muted);
    transition: all var(--dm-transition);
}
.dm-nav-link:hover {
    color: var(--dm-text);
    background: rgba(56, 189, 248, 0.08);
}
.dm-nav-link.active {
    color: var(--dm-ocean-light);
    background: rgba(56, 189, 248, 0.12);
}
.dm-nav-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

/* Header Actions */
.dm-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* User dropdown */
.dm-user-dropdown { position: relative; }
.dm-user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: var(--dm-radius-sm);
    background: rgba(56, 189, 248, 0.06);
    border: 1px solid var(--dm-border);
    cursor: pointer;
    transition: all var(--dm-transition);
    font-size: 0.875rem;
    color: var(--dm-text);
}
.dm-user-btn:hover { background: rgba(56, 189, 248, 0.12); }
.dm-avatar-sm {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--dm-ocean), var(--dm-indigo));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    flex-shrink: 0;
}
.dm-user-name {
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dm-chevron {
    width: 16px;
    height: 16px;
    transition: transform var(--dm-transition);
}

.dm-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 220px;
    background: var(--dm-surface);
    border: 1px solid var(--dm-border-light);
    border-radius: var(--dm-radius);
    box-shadow: var(--dm-shadow-lg);
    overflow: hidden;
    z-index: 200;
}
.dm-dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--dm-border);
}
.dm-dropdown-footer { padding: 8px; }
.dm-logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--dm-radius-sm);
    border: none;
    background: none;
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--dm-danger);
    transition: all var(--dm-transition);
}
.dm-logout-btn:hover { background: rgba(239, 68, 68, 0.1); }

/* Role Badges */
.dm-role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.dm-role-admin { background: rgba(99, 102, 241, 0.2); color: var(--dm-indigo-light); }
.dm-role-official { background: rgba(14, 165, 233, 0.2); color: var(--dm-ocean-light); }
.dm-role-guest { background: rgba(100, 116, 139, 0.2); color: var(--dm-text-muted); }

/* ===== BUTTONS ===== */
.dm-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--dm-radius-sm);
    border: none;
    background: linear-gradient(135deg, var(--dm-ocean), var(--dm-indigo));
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--dm-transition);
    white-space: nowrap;
}
.dm-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 20px rgba(14, 165, 233, 0.3);
}
.dm-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--dm-radius-sm);
    border: 1px solid var(--dm-border-light);
    background: rgba(56, 189, 248, 0.05);
    color: var(--dm-text);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--dm-transition);
    white-space: nowrap;
}
.dm-btn-secondary:hover {
    background: rgba(56, 189, 248, 0.1);
    border-color: var(--dm-ocean);
}
.dm-btn-block { width: 100%; justify-content: center; }
.dm-btn-active { box-shadow: 0 0 0 2px var(--dm-ocean); }

/* Icon buttons */
.dm-btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--dm-radius-sm);
    border: none;
    cursor: pointer;
    transition: all var(--dm-transition);
    background: none;
    flex-shrink: 0;
}
.dm-btn-icon svg { width: 18px; height: 18px; }
.dm-btn-edit { color: var(--dm-ocean-light); }
.dm-btn-edit:hover { background: rgba(14, 165, 233, 0.15); }
.dm-btn-delete { color: var(--dm-danger); }
.dm-btn-delete:hover { background: rgba(239, 68, 68, 0.15); }
.dm-btn-view { color: var(--dm-success); }
.dm-btn-view:hover { background: rgba(16, 185, 129, 0.15); }
.dm-btn-toggle { color: var(--dm-warning); }
.dm-btn-toggle:hover { background: rgba(245, 158, 11, 0.15); }

.dm-action-group {
    display: flex;
    align-items: center;
    gap: 4px;
}
.dm-inline-form { display: inline; }

/* ===== MAIN CONTENT ===== */
.dm-main {
    min-height: calc(100vh - 64px - 60px);
}

/* ===== PAGE ===== */
.dm-page {
    max-width: 1280px;
    margin: 0 auto;
    padding: 32px 24px;
}

.dm-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 28px;
}
.dm-page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dm-text);
    letter-spacing: -0.02em;
}
.dm-page-subtitle {
    font-size: 0.875rem;
    color: var(--dm-text-muted);
    margin-top: 4px;
}

.dm-admin-nav {
    display: flex;
    gap: 8px;
}

/* ===== SECTION ===== */
.dm-section {
    margin-bottom: 40px;
}
.dm-section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dm-text);
    margin-bottom: 20px;
}
.dm-section-icon {
    width: 24px;
    height: 24px;
    color: var(--dm-ocean);
}

/* ===== HERO (Dashboard) ===== */
.dm-hero {
    position: relative;
    padding: 60px 0 48px;
    text-align: center;
    overflow: hidden;
}
.dm-hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% -20%, rgba(14, 165, 233, 0.12), transparent),
        radial-gradient(ellipse 60% 50% at 80% 80%, rgba(99, 102, 241, 0.08), transparent);
}
.dm-hero-content {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    padding: 0 24px;
}
.dm-hero-title {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--dm-ocean-light), var(--dm-indigo-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.dm-hero-subtitle {
    color: var(--dm-text-muted);
    font-size: 1rem;
    margin-top: 12px;
    line-height: 1.7;
}

/* Search Bar */
.dm-search-bar {
    display: flex;
    align-items: center;
    background: var(--dm-card);
    border: 1px solid var(--dm-border-light);
    border-radius: 50px;
    padding: 4px;
    margin-top: 28px;
    transition: all var(--dm-transition);
}
.dm-search-bar:focus-within {
    border-color: var(--dm-ocean);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}
.dm-search-icon {
    width: 20px;
    height: 20px;
    color: var(--dm-text-muted);
    margin-left: 16px;
    flex-shrink: 0;
}
.dm-search-input {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    outline: none;
    font-size: 0.9375rem;
    color: var(--dm-text);
}
.dm-search-input::placeholder { color: var(--dm-text-dim); }
.dm-search-btn {
    padding: 10px 24px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, var(--dm-ocean), var(--dm-indigo));
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--dm-transition);
}
.dm-search-btn:hover {
    box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

/* ===== STATS BAR ===== */
.dm-stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 24px;
    margin-bottom: 32px;
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
    border-radius: var(--dm-radius);
}
.dm-stat-item {
    text-align: center;
}
.dm-stat-num {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--dm-ocean-light), var(--dm-indigo-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.dm-stat-label {
    display: block;
    font-size: 0.8125rem;
    color: var(--dm-text-muted);
    margin-top: 4px;
}

/* ===== OFFICIAL CARD GRID ===== */
.dm-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.dm-official-card {
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
    border-radius: var(--dm-radius-lg);
    overflow: hidden;
    transition: all var(--dm-transition);
}
.dm-official-card:hover {
    border-color: var(--dm-border-light);
    transform: translateY(-3px);
    box-shadow: var(--dm-shadow);
}

.dm-card-photo-wrapper {
    position: relative;
    aspect-ratio: 1 / 1;
    background: var(--dm-surface);
    overflow: hidden;
}
.dm-card-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.dm-official-card:hover .dm-card-photo { transform: scale(1.04); }
.dm-card-body {
    padding: 16px;
}
.dm-card-name {
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--dm-text);
    margin-bottom: 2px;
}
.dm-card-position {
    font-size: 0.8125rem;
    color: var(--dm-ocean-light);
    margin-bottom: 10px;
}
.dm-card-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8125rem;
    color: var(--dm-text-muted);
}
.dm-card-guild-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--dm-text-muted);
    transition: color var(--dm-transition);
}
.dm-card-guild-link:hover { color: var(--dm-ocean-light); }
.dm-card-guild-logo {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
}
.dm-card-game {
    padding: 2px 8px;
    background: rgba(56, 189, 248, 0.1);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--dm-ocean-light);
}

/* Status Badge */
.dm-status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    backdrop-filter: blur(8px);
}
.dm-status-active {
    background: rgba(16, 185, 129, 0.85);
    color: #fff;
}
.dm-status-inactive {
    background: rgba(100, 116, 139, 0.85);
    color: #fff;
}

/* ===== GUILD GRID ===== */
.dm-guild-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.dm-guild-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
    border-radius: var(--dm-radius);
    transition: all var(--dm-transition);
}
.dm-guild-card:hover {
    border-color: var(--dm-border-light);
    transform: translateY(-2px);
    box-shadow: var(--dm-shadow);
}
.dm-guild-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--dm-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}
.dm-guild-info { min-width: 0; }
.dm-guild-name {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--dm-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dm-guild-type {
    font-size: 0.75rem;
    color: var(--dm-text-muted);
}

/* ===== GUILD PROFILE ===== */
.dm-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--dm-text-muted);
    margin-bottom: 24px;
}
.dm-breadcrumb-link {
    color: var(--dm-ocean-light);
    transition: color var(--dm-transition);
}
.dm-breadcrumb-link:hover { color: var(--dm-ocean); }
.dm-breadcrumb-sep { color: var(--dm-text-dim); }
.dm-breadcrumb-current { color: var(--dm-text); }

.dm-guild-profile {
    position: relative;
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
    border-radius: var(--dm-radius-lg);
    padding: 40px;
    overflow: hidden;
    margin-bottom: 32px;
}
.dm-guild-profile-bg {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 60% 50% at 20% 50%, rgba(14, 165, 233, 0.08), transparent);
}
.dm-guild-profile-content {
    position: relative;
    display: flex;
    align-items: center;
    gap: 28px;
}
.dm-guild-profile-logo-wrap {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
    border-radius: var(--dm-radius);
    overflow: hidden;
    border: 3px solid var(--dm-border-light);
}
.dm-guild-profile-logo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.dm-guild-profile-name {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--dm-text);
}
.dm-guild-profile-type {
    font-size: 0.875rem;
    color: var(--dm-ocean-light);
    margin-top: 4px;
    display: inline-block;
}
.dm-guild-profile-meta {
    display: flex;
    gap: 32px;
    margin-top: 16px;
}
.dm-guild-meta-label {
    font-size: 0.75rem;
    color: var(--dm-text-dim);
    display: block;
}
.dm-guild-meta-value {
    font-size: 0.9375rem;
    color: var(--dm-text);
    font-weight: 500;
}
.dm-guild-description {
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
    border-radius: var(--dm-radius);
    padding: 20px;
    color: var(--dm-text-muted);
    line-height: 1.8;
}

/* ===== TABLE ===== */
.dm-table-search {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}
.dm-table-search .dm-form-input { max-width: 360px; }
.dm-table-wrap {
    overflow-x: auto;
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
    border-radius: var(--dm-radius);
}
.dm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.dm-table thead {
    background: var(--dm-surface);
    border-bottom: 1px solid var(--dm-border-light);
}
.dm-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--dm-text-muted);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.dm-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--dm-border);
    color: var(--dm-text);
    vertical-align: middle;
}
.dm-table tbody tr:last-child td { border-bottom: none; }
.dm-table tbody tr:hover { background: rgba(56, 189, 248, 0.03); }
.dm-table tbody tr.dm-row-hidden {
    background: rgba(100, 116, 139, 0.04);
    opacity: 0.6;
}
.dm-th-no { width: 50px; text-align: center; }
.dm-th-action { width: 140px; text-align: center; }
.dm-td-name { font-weight: 600; }
.dm-td-term { white-space: nowrap; font-size: 0.8125rem; color: var(--dm-text-muted); }
.dm-table-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}
.dm-table-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--dm-radius-sm);
    object-fit: cover;
}
.dm-table-empty {
    text-align: center;
    padding: 40px 16px !important;
    color: var(--dm-text-dim);
}
.dm-type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    background: rgba(99, 102, 241, 0.15);
    color: var(--dm-indigo-light);
}

/* ===== PAGINATION ===== */
.dm-pagination {
    margin-top: 24px;
    display: flex;
    justify-content: center;
}
.dm-pagination nav { display: flex; }
.dm-pagination .flex-1 { display: none; }
.dm-pagination .inline-flex {
    display: flex;
    gap: 4px;
    list-style: none;
}
.dm-pagination a,
.dm-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 8px;
    border-radius: var(--dm-radius-sm);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all var(--dm-transition);
}
.dm-pagination a {
    color: var(--dm-text-muted);
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
}
.dm-pagination a:hover {
    background: var(--dm-card-hover);
    border-color: var(--dm-border-light);
}
.dm-pagination .active span {
    background: linear-gradient(135deg, var(--dm-ocean), var(--dm-indigo));
    color: white;
    border-color: transparent;
}
.dm-pagination .disabled span {
    color: var(--dm-text-dim);
    background: none;
    border: none;
    cursor: default;
}

/* ===== FORM ===== */
.dm-form-card {
    max-width: 720px;
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
    border-radius: var(--dm-radius-lg);
    padding: 32px;
}
.dm-form-title {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--dm-text);
    margin-bottom: 4px;
}
.dm-form-subtitle {
    font-size: 0.875rem;
    color: var(--dm-text-muted);
    margin-bottom: 24px;
}
.dm-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.dm-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.dm-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.dm-form-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--dm-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.dm-required { color: var(--dm-danger); }
.dm-form-input,
.dm-form-textarea,
.dm-form-file {
    padding: 11px 14px;
    background: var(--dm-surface);
    border: 1px solid var(--dm-border-light);
    border-radius: var(--dm-radius-sm);
    font-size: 0.875rem;
    color: var(--dm-text);
    transition: all var(--dm-transition);
    outline: none;
}
.dm-form-input:focus,
.dm-form-textarea:focus {
    border-color: var(--dm-ocean);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}
.dm-form-input::placeholder,
.dm-form-textarea::placeholder { color: var(--dm-text-dim); }
.dm-input-error { border-color: var(--dm-danger) !important; }
.dm-form-textarea { resize: vertical; min-height: 100px; }
.dm-form-file { padding: 9px; cursor: pointer; }
.dm-form-hint {
    font-size: 0.75rem;
    color: var(--dm-text-dim);
    margin-top: 2px;
}
.dm-form-hint code {
    background: rgba(56, 189, 248, 0.1);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.75rem;
}
.dm-form-current-photo {
    margin-top: 4px;
    margin-bottom: 8px;
}
.dm-form-photo-preview {
    width: 80px;
    height: 80px;
    border-radius: var(--dm-radius-sm);
    object-fit: cover;
    border: 1px solid var(--dm-border-light);
}
.dm-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--dm-border);
}

/* Checkbox */
.dm-checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}
.dm-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--dm-ocean);
    cursor: pointer;
}
.dm-checkbox-label {
    font-size: 0.875rem;
    color: var(--dm-text-muted);
    user-select: none;
}

/* ===== FEATURE GRID (Admin) ===== */
.dm-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.dm-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px;
    background: var(--dm-surface);
    border: 1px solid var(--dm-border);
    border-radius: var(--dm-radius);
    cursor: pointer;
    transition: all var(--dm-transition);
}
.dm-feature-item:hover { border-color: var(--dm-border-light); }
.dm-feature-item:has(.dm-checkbox:checked) {
    border-color: var(--dm-ocean);
    background: rgba(14, 165, 233, 0.05);
}
.dm-feature-content { min-width: 0; }
.dm-feature-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--dm-text);
    display: block;
}
.dm-feature-desc {
    font-size: 0.75rem;
    color: var(--dm-text-dim);
    display: block;
    margin-top: 2px;
}

/* ===== ROLE GRID (Admin) ===== */
.dm-role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.dm-role-card {
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
    border-radius: var(--dm-radius-lg);
    padding: 24px;
    transition: all var(--dm-transition);
}
.dm-role-card:hover { border-color: var(--dm-border-light); }
.dm-role-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}
.dm-role-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dm-text);
}
.dm-role-card-count {
    font-size: 0.75rem;
    color: var(--dm-text-dim);
    background: var(--dm-surface);
    padding: 2px 10px;
    border-radius: 20px;
}
.dm-role-card-desc {
    font-size: 0.8125rem;
    color: var(--dm-text-muted);
    margin-bottom: 16px;
}
.dm-role-full {
    font-size: 0.8125rem;
    color: var(--dm-success);
    font-weight: 600;
    margin-top: 8px;
}

/* ===== ALERTS ===== */
.dm-alert-success {
    padding: 12px 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--dm-radius-sm);
    color: var(--dm-success);
    font-size: 0.875rem;
    margin-bottom: 16px;
}
.dm-alert-error {
    padding: 12px 16px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: var(--dm-radius-sm);
    color: var(--dm-danger);
    font-size: 0.875rem;
    margin-bottom: 16px;
}
.dm-alert-error ul { padding-left: 18px; }
.dm-alert-error li { margin-bottom: 2px; }

/* ===== EMPTY STATE ===== */
.dm-empty {
    text-align: center;
    padding: 48px 24px;
    color: var(--dm-text-dim);
}
.dm-empty-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 12px;
    color: var(--dm-text-dim);
    opacity: 0.5;
}

/* ===== AUTH ===== */
.dm-auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 64px - 60px);
    padding: 40px 24px;
}
.dm-auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--dm-card);
    border: 1px solid var(--dm-border);
    border-radius: var(--dm-radius-lg);
    padding: 40px;
    box-shadow: var(--dm-shadow-lg);
}
.dm-auth-header {
    text-align: center;
    margin-bottom: 32px;
}
.dm-auth-logo {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
}
.dm-auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dm-text);
}
.dm-auth-subtitle {
    font-size: 0.875rem;
    color: var(--dm-text-muted);
    margin-top: 6px;
}
.dm-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.dm-auth-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--dm-border);
}
.dm-auth-back {
    font-size: 0.8125rem;
    color: var(--dm-text-muted);
    transition: color var(--dm-transition);
}
.dm-auth-back:hover { color: var(--dm-ocean-light); }

/* ===== FOOTER (Glassmorphism) ===== */
.dm-footer {
    background: var(--dm-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--dm-glass-border);
}
.dm-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.dm-footer-text {
    font-size: 0.8125rem;
    color: var(--dm-text-muted);
}
.dm-footer-meta {
    font-size: 0.75rem;
    color: var(--dm-text-dim);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .dm-header-inner {
        padding: 0 16px;
        gap: 16px;
    }
    .dm-nav { gap: 0; }
    .dm-nav-link span { display: none; }
    .dm-nav-link { padding: 8px 10px; }
    .dm-user-name { display: none; }

    .dm-hero-title { font-size: 1.5rem; }
    .dm-hero-subtitle { font-size: 0.875rem; }

    .dm-stats-bar { gap: 24px; flex-wrap: wrap; }
    .dm-stat-num { font-size: 1.5rem; }

    .dm-card-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
    .dm-guild-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }

    .dm-page-header { flex-direction: column; }
    .dm-form-row { grid-template-columns: 1fr; }
    .dm-form-card { padding: 20px; }

    .dm-guild-profile-content { flex-direction: column; text-align: center; }
    .dm-guild-profile-meta { justify-content: center; }

    .dm-footer-inner { flex-direction: column; text-align: center; }
    .dm-table-wrap { margin: 0 -16px; border-radius: 0; }
    .dm-page { padding: 24px 16px; }
    .dm-role-grid { grid-template-columns: 1fr; }
    .dm-feature-grid { grid-template-columns: 1fr; }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--dm-deep); }
::-webkit-scrollbar-thumb { background: var(--dm-border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--dm-ocean-dark); }