/* ── Clan System ── */

.cs-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
}

/* ── List page ── */
.cs-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.cs-list-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 0.5px;
}

.cs-search-box {
    display: flex;
    gap: 8px;
}

.cs-search-box input {
    padding: 8px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: #ccc;
    font-size: 13px;
    outline: none;
}

.cs-search-box input:focus { border-color: var(--cs-accent); }

.cs-btn {
    padding: 8px 18px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform 0.15s, opacity 0.15s;
    color: #fff;
}

.cs-btn:hover { transform: translateY(-1px); opacity: 0.9; }

.cs-btn-primary { background: var(--cs-accent); }
.cs-btn-danger  { background: #c0392b; }
.cs-btn-dark    { background: rgba(255,255,255,0.1); }
.cs-btn-success { background: #27ae60; }

.cs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.cs-card {
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.cs-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(0,0,0,0.4);
}

.cs-card-banner {
    height: 60px;
    position: relative;
}

.cs-card-logo {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    border: 3px solid #1a1a1a;
    position: absolute;
    bottom: -28px;
    left: 16px;
    background: #333;
}

.cs-card-body {
    padding: 36px 16px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cs-card-name {
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cs-card-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255,255,255,0.08);
}

.cs-card-desc {
    font-size: 12px;
    line-height: 1.5;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.cs-card-stats {
    display: flex;
    gap: 14px;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 12px;
}

.cs-card-stat { display: flex; align-items: center; gap: 4px; }

.cs-badge-recruiting {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    background: rgba(39,174,96,0.2);
    color: #2ecc71;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cs-badge-full {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
    background: rgba(192,57,43,0.2);
    color: #e74c3c;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Profile page ── */
.cs-profile-header {
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
}

.cs-profile-banner {
    height: 140px;
    position: relative;
}

.cs-profile-banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.5) 100%);
}

.cs-profile-logo {
    width: 100px;
    height: 100px;
    border-radius: 16px;
    object-fit: cover;
    border: 4px solid #1a1a1a;
    position: absolute;
    bottom: -50px;
    left: 28px;
    background: #333;
}

.cs-profile-info-bar {
    padding: 60px 28px 18px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.cs-profile-name {
    font-size: 26px;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cs-profile-tag {
    font-size: 14px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.08);
}

.cs-profile-meta {
    font-size: 13px;
    margin-top: 4px;
}

.cs-profile-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cs-profile-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
}

@media (max-width: 768px) {
    .cs-profile-body { grid-template-columns: 1fr; }
}

.cs-section {
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.cs-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}

.cs-description {
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
}

/* Members table */
.cs-members-table {
    width: 100%;
    border-collapse: collapse;
}

.cs-members-table th {
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.cs-members-table td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 13px;
}

.cs-member-row:hover { background: rgba(255,255,255,0.03); }

.cs-member-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
    margin-right: 8px;
}

.cs-role-badge {
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cs-role-leader  { background: rgba(232,112,10,0.2); color: #e8700a; }
.cs-role-officer { background: rgba(52,152,219,0.2); color: #3498db; }
.cs-role-member  { background: rgba(255,255,255,0.08); color: #aaa; }

/* Sidebar */
.cs-sidebar-section {
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 16px;
}

.cs-sidebar-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.cs-stat-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 13px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.cs-stat-row:last-child { border-bottom: none; }

.cs-social-links {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cs-social-link {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.15s;
    background: rgba(255,255,255,0.06);
}

.cs-social-link:hover { transform: translateY(-2px); }
.cs-social-link svg { width: 18px; height: 18px; fill: #ccc; }

/* Forms */
.cs-form {
    max-width: 600px;
    margin: 0 auto;
    border-radius: 14px;
    padding: 28px;
}

.cs-form-group {
    margin-bottom: 18px;
}

.cs-form-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
}

.cs-form-input,
.cs-form-textarea,
.cs-form-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: #ccc;
    font-size: 14px;
    outline: none;
    font-family: inherit;
    box-sizing: border-box;
}

.cs-form-input:focus,
.cs-form-textarea:focus,
.cs-form-select:focus {
    border-color: var(--cs-accent);
}

.cs-form-textarea { min-height: 100px; resize: vertical; }

.cs-form-hint {
    font-size: 11px;
    margin-top: 4px;
}

/* Join requests */
.cs-request-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.04);
}

.cs-request-info { flex: 1; }
.cs-request-name { font-weight: 700; font-size: 14px; }
.cs-request-msg { font-size: 12px; margin-top: 2px; }
.cs-request-actions { display: flex; gap: 6px; }

/* Empty state */
.cs-empty {
    text-align: center;
    padding: 48px 20px;
    border-radius: 12px;
}

.cs-empty-icon { font-size: 48px; margin-bottom: 12px; }
.cs-empty-text { font-size: 15px; }

/* Pagination */
.cs-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
}

.cs-pagination a,
.cs-pagination span {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
}

.cs-pagination .cs-active {
    background: var(--cs-accent);
    color: #fff;
    font-weight: 700;
}

/* Index widget */
.cs-index-widget {
    border-radius: 12px;
    padding: 16px;
    margin: 16px 0;
}

.cs-index-widget-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cs-index-clan-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.cs-index-clan-row:last-child { border-bottom: none; }

.cs-index-clan-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: cover;
}

.cs-index-clan-name {
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
}

.cs-index-clan-meta {
    font-size: 11px;
}

/* Alert messages */
.cs-alert {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
}

.cs-alert-success { background: rgba(39,174,96,0.15); color: #2ecc71; }
.cs-alert-error   { background: rgba(192,57,43,0.15); color: #e74c3c; }
.cs-alert-info    { background: rgba(52,152,219,0.15); color: #3498db; }