/* Settings Page Specific Styles */

.settings-nav {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
}

body.light-mode .settings-nav {
    border-bottom: 1px solid #eee;
}

.nav-tab {
    padding: 10px 20px;
    background: #333;
    border: 1px solid #555;
    color: #e0e0e0;
    text-decoration: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.light-mode .nav-tab {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #333;
}

.nav-tab.active {
    background: #4285f4;
    border-color: #4285f4;
    color: white;
}

.nav-tab:hover {
    background: #444;
    border-color: #666;
}

body.light-mode .nav-tab:hover {
    background: #e5e5e5;
    border-color: #ccc;
}

.nav-tab.active:hover {
    background: #3367d6;
}

.settings-section {
    display: none;
}

.settings-section.active {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #ccc;
    font-weight: 500;
}

body.light-mode .form-group label {
    color: #333;
}

.form-group input,
.form-group select {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #333;
    color: #e0e0e0;
    font-size: 14px;
}

body.light-mode .form-group input,
body.light-mode .form-group select {
    border: 1px solid #ddd;
    background: white;
    color: #333;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4285f4;
}

.user-card {
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

body.light-mode .user-card {
    background: white;
    border: 1px solid #eee;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-info h4 {
    margin: 0 0 5px 0;
    color: #e0e0e0;
}

body.light-mode .user-info h4 {
    color: #333;
}

.user-info p {
    margin: 0;
    color: #888;
    font-size: 14px;
}

.user-actions {
    display: flex;
    gap: 10px;
}

.user-actions .btn {
    padding: 6px 12px;
    font-size: 12px;
}

.role-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.role-admin {
    background: #f44336;
    color: white;
}

.role-member {
    background: #4caf50;
    color: white;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background: #2a2a2a;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    border: 1px solid #333;
}

body.light-mode .modal-content {
    background: white;
    border: 1px solid #eee;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
    color: #e0e0e0;
}

body.light-mode .modal-header h3 {
    color: #333;
}

.close {
    color: #888;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #e0e0e0;
}

body.light-mode .close:hover {
    color: #333;
}

.organization-section {
    margin-bottom: 40px;
    border-bottom: 1px solid #333;
    padding-bottom: 20px;
}

body.light-mode .organization-section {
    border-bottom: 1px solid #eee;
}

.organization-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.organization-header h3 {
    margin: 0;
    color: #4285f4;
}

.no-permissions {
    text-align: center;
    color: #888;
    font-style: italic;
    padding: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .settings-nav {
        flex-wrap: wrap;
        gap: 10px;
    }

    .user-card {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .user-actions {
        justify-content: center;
    }

    .modal-content {
        margin: 10% auto;
        padding: 20px;
    }
}

/* PREVIOUSLY IN HTML */

/* Group Management Styles */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.group-card {
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

body.light-mode .group-card {
    background: white;
    border: 1px solid #eee;
}

.group-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

body.light-mode .group-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.group-prefix {
    background: #333;
    color: #4285f4;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

body.light-mode .group-prefix {
    background: #f0f0f0;
    color: #4285f4;
}

.group-description {
    color: #888;
    font-size: 14px;
    margin-bottom: 15px;
}

body.light-mode .group-description {
    color: #666;
}

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

.group-actions .btn {
    font-size: 12px;
    padding: 6px 12px;
}

/* Group Details Modal Styles */
.group-details-content {
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
}

.detail-tabs {
    display: flex;
    border-bottom: 1px solid #333;
    margin-bottom: 20px;
}

body.light-mode .detail-tabs {
    border-bottom: 1px solid #eee;
}

.detail-tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.detail-tab.active {
    border-bottom-color: #4285f4;
    color: #4285f4;
}

.detail-tab:hover {
    background: #333;
}

body.light-mode .detail-tab:hover {
    background: #f5f5f5;
}

.detail-content {
    display: none;
}

.detail-content.active {
    display: block;
}

.member-item, .tag-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 6px;
    margin-bottom: 10px;
    background: #2a2a2a;
}

body.light-mode .member-item,
body.light-mode .tag-item {
    border: 1px solid #eee;
    background: #f9f9f9;
}

.member-info, .tag-info {
    flex: 1;
}

.member-name {
    font-weight: 500;
    display: block;
}

.member-email {
    color: #888;
    font-size: 12px;
}

body.light-mode .member-email {
    color: #666;
}

.member-actions {
    display: flex;
    gap: 8px;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 11px;
}

.tag-item {
    align-items: center;
}

.tag-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
}

.tag-name {
    font-weight: 500;
    margin-right: 10px;
}

.permission-level {
    background: #4285f4;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
}

/* Form Styles */
.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

textarea {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    border: 1px solid #555;
    border-radius: 4px;
    background: #333;
    color: #e0e0e0;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

body.light-mode textarea {
    border: 1px solid #ddd;
    background: white;
    color: #333;
}

textarea:focus {
    outline: none;
    border-color: #4285f4;
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-size: 14px;
}

.alert-success {
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    color: #4caf50;
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    color: #f44336;
}

/* Tag Management Styles */
.tags-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.tag-card {
    background: #2a2a2a;
    border: 1px solid #333;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

body.light-mode .tag-card {
    background: white;
    border: 1px solid #eee;
}

.tag-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

body.light-mode .tag-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.tag-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.tag-description {
    color: #888;
    font-size: 14px;
    margin-bottom: 15px;
}

body.light-mode .tag-description {
    color: #666;
}

.tag-groups {
    margin-bottom: 15px;
    font-size: 13px;
}

.group-badge {
    background: #4285f4;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin: 2px;
    display: inline-block;
}

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

.tag-actions .btn {
    font-size: 12px;
    padding: 6px 12px;
}

.group-permission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 6px;
    margin-bottom: 10px;
    background: #2a2a2a;
}

body.light-mode .group-permission-item {
    border: 1px solid #eee;
    background: #f9f9f9;
}

.group-info label {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.group-info input[type="checkbox"] {
    margin-right: 8px;
}

.group-name {
    font-weight: 500;
}

.color-input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-preview {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #333;
}

body.light-mode .color-preview {
    border-color: #ddd;
}