/* Center logo */
.logo-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px; /* spacing below logo */
}

.logo-container img {
  height: 60px; /* smaller logo */
  width: auto;  /* keeps proportions */
}

/* Brand color buttons */
.btn-primary,
button,
input[type="submit"] {
  background-color: #3979be;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.btn-primary:hover,
button:hover,
input[type="submit"]:hover {
  background-color: #2f68a3;
}

/* Explicit styles for the dashboard menu toggle so it stays icon-only */
#menu-btn {
  background: transparent;
  padding: 0;
}

#menu-btn:hover,
#menu-btn:focus {
  background: transparent;
}

/* Settings page (account settings) */
.cmf-settings-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 16px;
}

.cmf-settings-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.cmf-settings-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
}

.cmf-settings-tab {
    border: none;
    background: transparent;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 0.95rem;
    border-radius: 999px;
    color: #555;
}

.cmf-settings-tab.cmf-active {
    background: #3979be;
    color: #fff;
}

.cmf-settings-messages {
    margin-bottom: 16px;
}

.cmf-alert-success {
    background: #e6ffed;
    border-left: 4px solid #3ba55d;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.cmf-alert-error {
    background: #ffe6e6;
    border-left: 4px solid #d32f2f;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.cmf-settings-panel {
    display: none;
    margin-top: 8px;
}

.cmf-settings-panel.cmf-active {
    display: block;
}

.cmf-settings-panel h2 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.cmf-settings-panel h3 {
    font-size: 1rem;
    margin-top: 12px;
    margin-bottom: 8px;
}

.cmf-form {
    max-width: 500px;
    background: #fafafa;
    border-radius: 6px;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.cmf-form-group {
    margin-bottom: 10px;
}

.cmf-form-group label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 4px;
    font-weight: 500;
}

.cmf-form-group input {
    width: 100%;
    padding: 8px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 0.9rem;
    box-sizing: border-box;
}

.cmf-form-group input[disabled] {
    background: #f3f3f3;
    color: #666;
}

.cmf-btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    border: none;
    font-size: 0.9rem;
    cursor: pointer;
    background: #3979be;
    color: #fff;
}

.cmf-btn-danger {
    background: #b00020;
}

.cmf-ig-list {
    list-style: none;
    padding: 0;
    margin: 0 0 10px 0;
}

.cmf-ig-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.cmf-ig-card {
    background: #f2f6fb;
    border: 1px solid #d9e3f4;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.cmf-ig-list li {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 6px;
    background: #f7f7f7;
}

.cmf-ig-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
}

.cmf-ig-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.cmf-ig-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cmf-ig-actions form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.cmf-ig-edit-form {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.cmf-ig-edit-form input[type="text"] {
    flex: 1 1 220px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.9rem;
}

.cmf-collapsed {
    display: none !important;
}

.cmf-ig-edit-form.cmf-open {
    display: flex;
}

.js-add-username-form {
    margin-top: 10px;
}

.js-add-username-form.cmf-open {
    display: block;
}

.js-add-username-form .cmf-btn {
    padding: 8px 12px;
}

.cmf-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #3979be;
    background: #fff;
    color: #3979be;
    cursor: pointer;
    padding: 6px;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cmf-icon-btn:hover {
    background: #3979be;
    color: #fff;
}

.cmf-icon-btn svg {
    width: 16px;
    height: 16px;
}

.cmf-icon-danger {
    border-color: #b00020;
    color: #b00020;
}

.cmf-icon-danger:hover {
    background: #b00020;
    color: #fff;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.cmf-ig-name {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
}

.cmf-ig-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.cmf-ig-actions form {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
}

.cmf-ig-actions input[type="text"] {
    width: 150px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 0.85rem;
}

.cmf-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #3979be;
    background: #fff;
    color: #3979be;
    cursor: pointer;
    padding: 6px;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.cmf-icon-btn:hover {
    background: #3979be;
    color: #fff;
}

.cmf-icon-btn svg {
    width: 16px;
    height: 16px;
}

.cmf-icon-danger {
    border-color: #b00020;
    color: #b00020;
}

.cmf-icon-danger:hover {
    background: #b00020;
    color: #fff;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.cmf-badge-main {
    background: #3979be;
    color: #fff;
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 0.75rem;
    margin-left: 6px;
}

.cmf-help-text {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .cmf-form {
        max-width: 100%;
    }

    .cmf-settings-wrapper {
        padding: 8px;
    }
}