.card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    overflow: hidden;
}
.card-header { font-weight: 600;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    font-size: 14px;
}
.card-body { padding: 20px; }
.card-body.p0 { padding: 0; }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}
.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 12px;
}
.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-icon.blue { background: #f0fdfa; color: #0f766e; }
.stat-icon.green { background: #ecfdf5; color: #10b981; }
.stat-icon.orange { background: #fff7ed; color: #f59e0b; }
.stat-icon.red { background: #fef2f2; color: #ef4444; }
.stat-info h3 { font-size: 22px; font-weight: 600; color: #111827; line-height: 1; }
.stat-info p { font-size: 12px; color: #4b5563; margin-top: 3px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
thead th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #4b5563;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    white-space: nowrap;
    font-size: 12px;
}
tbody td { padding: 14px 16px; border-bottom: 1px solid #e2e8f0; vertical-align: middle; }
tbody tr:hover { background: #f8fafc; }
tbody tr:last-child td { border-bottom: none; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}
.badge-success { background: #dcfce7; color: #166534; }
.badge-danger { background: #fee2e2; color: #991b1b; }
.badge-warning { background: #fef3c7; color: #92400e; }
.badge-info { background: #cffafe; color: #155e75; }
:root .badge-gray,
.badge-gray { background: #f1f5f9; color: #4b5563; }
.badge-current { background: #dcfce7; color: #166534; }
.badge-black { background: #fee2e2; color: #991b1b; }
.badge-normal { background: #e0f2fe; color: #075985; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    border: none;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    background: #f1f5f9;
    color: #374151;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); }
.btn-primary { background: #0f766e; color: #fff; }
.btn-primary:hover { background: #115e59; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-secondary { background: #f1f5f9; color: #374151; border: 1px solid #e2e8f0; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 600; color: #374151; }
.form-control {
    width: 100%;
    padding: 5px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 13px;
    outline: none;
    background: #fff;
    color: #334155;
}
.form-control:focus { border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15,118,110,0.1); }
select.form-control { cursor: pointer; }
.form-row { display: flex; gap: 16px; flex-wrap: wrap; }
.form-row .form-group { flex: 1; min-width: 200px; }

.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 13px;
    border: 1px solid transparent;
}
.alert-success { background: #f0fdf4; color: #166534; border-color: #bbf7d0; }
.alert-error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.alert-warning { background: #fffbeb; color: #92400e; border-color: #fde68a; }

.key-display {
    font-family: monospace;
    font-size: 12px;
    background: #f8fafc;
    padding: 6px 10px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    word-break: break-all;
    cursor: pointer;
    display: inline-block;
}
.key-display:hover { background: #f1f5f9; }

.filter-bar {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}
.filter-bar form { display: flex; gap: 12px; flex-wrap: wrap; width: 100%; }
.filter-bar .form-group { margin-bottom: 0; flex: 1; min-width: 150px; }

.empty-state { text-align: center; padding: 40px; color: #4b5563; font-size: 14px; }

.pagination { display: flex; gap: 4px; justify-content: flex-end; padding: 16px; }
.pagination a {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    border: 1px solid #e2e8f0;
    color: #374151;
    background: #fff;
}
.pagination a:hover { background: #f1f5f9; }
.pagination .current { background: #0f766e; color: #fff; border-color: #0f766e; }

.td-actions { white-space: nowrap; }
.td-actions > div { display: flex; gap: 4px; align-items: center; }

.email-btn {
    height: 28px;
    padding: 0 12px;
    font-size: 13px;
    line-height: 1;
    box-sizing: border-box;
    border-radius: 6px;
}

#getCodeBtn {
    height: 28px;
    padding: 0 12px;
    font-size: 13px;
    line-height: 1;
    box-sizing: border-box;
}

.ips-container select.form-control,
.ips-container input.form-control {
    height: 31px;
    padding: 0 8px;
    line-height: 1;
    box-sizing: border-box;
}
.ips-container .btn {
    height: 31px;
    padding: 0 12px;
    line-height: 1;
    box-sizing: border-box;
}

.section-card {
    margin-top: 12px;
}

.section-flex {
    display: flex;
    gap: 16px;
    align-items: stretch;
    margin-top: 6px;
    margin-left: 0;
    margin-right: 0;
}
.section-flex > .card {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
}

.multi-select { position: relative; display: inline-block; min-width: 140px; }
.multi-select-btn { width: 100%; padding: 6px 10px; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; cursor: pointer; font-size: 12px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.multi-select-btn:hover { border-color: #3b82f6; }
.multi-select-dropdown { position: fixed; z-index: 99999; background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.2); max-height: 300px; overflow-y: auto; min-width: 240px; max-width: 300px; }
.multi-select-dropdown label:hover { background: #f8fafc; }
.keys-table tbody td { padding: 6px 8px !important; font-size: 12px !important; }
.keys-table thead th { padding: 6px 8px !important; font-size: 11px !important; }
.keys-table .form-control { padding: 4px 6px !important; font-size: 12px !important; height: 28px !important; }

.announcement-scroll { max-width: 170px; }
