* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f6fa;
    color: #2c3e50;
}

.admin-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.sidebar {
    width: 280px;
    background: linear-gradient(135deg, #2c5530 0%, #1e3a20 100%);
    color: white;
    transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: padding 0.3s ease;
}

.sidebar.collapsed .sidebar-header {
    padding: 15px 10px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.logo:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.02);
}

.sidebar.collapsed .logo {
    padding: 4px;
    gap: 0;
}

.sidebar.collapsed .logo:hover {
    transform: scale(1.1);
}

.logo img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar.collapsed .logo img {
    width: 36px;
    height: 36px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1;
    transform: translateX(0);
    white-space: nowrap;
}

.sidebar.collapsed .logo-text {
    display: none;
}


.sidebar-menu {
    list-style: none;
    padding: 20px 0;
    flex: 1;
    transition: padding 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.sidebar.collapsed .sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    margin-bottom: 8px;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.sidebar.collapsed .menu-item {
    margin-bottom: 8px;
    display: flex;
    justify-content: center;
}

.menu-item a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
}

.sidebar.collapsed .menu-item a {
    padding: 16px 0;
    justify-content: center;
    margin: 0 8px;
    border-radius: 10px;
    min-height: 50px;
    width: 64px;
    display: flex;
    align-items: center;
}

.menu-item a:hover,
.menu-item.active a {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.menu-item.active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #4CAF50;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.sidebar.collapsed .menu-item.active a::before {
    left: 50%;
    top: -2px;
    bottom: auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: translateX(-50%);
}

.menu-item i {
    font-size: 18px;
    margin-right: 15px;
    width: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.sidebar.collapsed .menu-item i {
    margin-right: 0;
    margin-left: 0;
    font-size: 22px;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.menu-text {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1;
    transform: translateX(0);
    white-space: nowrap;
}

.sidebar.collapsed .menu-text {
    display: none;
}

.notification-badge {
    background: #e74c3c;
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    margin-left: auto;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1;
    transform: scale(1);
}

.sidebar.collapsed .notification-badge {
    display: none;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    transition: padding 0.3s ease;
}

.sidebar.collapsed .sidebar-footer {
    padding: 15px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.sidebar.collapsed .user-info {
    margin-bottom: 10px;
    justify-content: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-avatar .avatar-initials {
    color: white;
    font-weight: 600;
    font-size: 14px;
}

.user-details {
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1;
    transform: translateX(0);
}

.sidebar.collapsed .user-details {
    display: none;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    opacity: 0.7;
}

.logout-btn {
    width: 100%;
    padding: 10px;
    background: rgba(231, 76, 60, 0.2);
    border: 1px solid rgba(231, 76, 60, 0.3);
    color: white;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.logout-btn:hover {
    background: rgba(231, 76, 60, 0.3);
}

.sidebar.collapsed .logout-btn {
    width: 44px;
    height: 44px;
    padding: 8px;
    border-radius: 50%;
}

.sidebar.collapsed .logout-btn span {
    display: none;
}

.logout-btn span {
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 1;
    transform: translateX(0);
}

/* Main Content */
.main-content {
    margin-left: 280px;
    flex: 1;
    transition: margin-left 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.sidebar.collapsed + .main-content {
    margin-left: 80px;
}

.content-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: background-color 0.3s ease;
}

.mobile-menu-btn:hover {
    background-color: #f8f9fa;
}

.sidebar-expand-btn {
    background: none;
    border: 2px solid #2c5530;
    font-size: 18px;
    cursor: pointer;
    padding: 10px 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: #2c5530;
    display: none;
    min-width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-expand-btn:hover {
    background-color: #2c5530;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(44, 85, 48, 0.2);
}

.sidebar.collapsed + .main-content .sidebar-expand-btn {
    display: flex;
}

.page-title {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box i {
    position: absolute;
    left: 15px;
    color: #6c757d;
}

.search-box input {
    padding: 10px 15px 10px 45px;
    border: 1px solid #e9ecef;
    border-radius: 25px;
    background: #f8f9fa;
    width: 300px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #2c5530;
    background: white;
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.notification-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 20px;
    color: #6c757d;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.notification-btn:hover {
    background-color: #f8f9fa;
    color: #2c5530;
}

.notification-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #e74c3c;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.profile-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.profile-img:hover {
    border-color: #2c5530;
}

.profile-avatar-initials {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2c5530;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease;
}

.profile-avatar-initials:hover {
    border-color: #2c5530;
}

/* Content Sections */
.content-section {
    display: none;
    padding: 30px;
    flex: 1;
}

.content-section.active {
    display: block;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 30px;
}

.section-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary {
    background: #2c5530;
    color: white;
}

.btn-primary:hover {
    background: #1e3a20;
    transform: translateY(-2px);
}

/* Dashboard Stats */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2c5530, #4CAF50);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.stat-info h3 {
    font-size: 32px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-info p {
    color: #6c757d;
    font-weight: 500;
}

/* Dashboard Widgets */
.dashboard-widgets {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.widget {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.widget-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8f9fa;
}

.widget-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.widget-action {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.widget-action:hover {
    background-color: #e9ecef;
    color: #2c5530;
}

.widget-content {
    padding: 25px;
}

.activity-item,
.event-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f8f9fa;
}

.activity-item:last-child,
.event-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: #e8f5e8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c5530;
}

.activity-info p {
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 5px;
}

.activity-time {
    font-size: 12px;
    color: #6c757d;
}

.event-date {
    width: 50px;
    height: 50px;
    background: #2c5530;
    color: white;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.event-date .date {
    font-size: 18px;
    line-height: 1;
}

.event-date .month {
    font-size: 12px;
    text-transform: uppercase;
}

.event-info h4 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.event-info p {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 8px;
}

.event-location {
    color: #2c5530;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Organization Section */
.org-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.org-info-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.org-info-card h3 {
    color: #2c5530;
    margin-bottom: 20px;
    font-size: 20px;
}

.org-info-card p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.members-list {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.members-list h4 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.member-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #f8f9fa;
}

.member-avatar {
    width: 50px;
    height: 50px;
    background: #e8f5e8;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2c5530;
    font-size: 20px;
}

.member-info {
    flex: 1;
}

.member-info h5 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.member-info p {
    color: #6c757d;
    font-size: 14px;
}

.member-actions {
    display: flex;
    gap: 10px;
}

.btn-icon {
    background: none;
    border: 1px solid #e9ecef;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background-color: #f8f9fa;
    border-color: #2c5530;
    color: #2c5530;
}

/* Activities Section */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
}

.activity-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.activity-card:hover {
    transform: translateY(-5px);
}

.activity-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.activity-header h4 {
    color: #2c3e50;
    font-size: 18px;
}

.activity-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.activity-status.active {
    background: #d4edda;
    color: #155724;
}

.activity-meta {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    font-size: 14px;
    color: #6c757d;
}

.activity-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Messages Section */
.messages-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.message-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.3s ease;
}

.message-item:hover {
    background-color: #f8f9fa;
}

.message-item.unread {
    background-color: #e8f5e8;
}

.message-sender {
    display: flex;
    align-items: center;
    gap: 15px;
}

.sender-avatar {
    width: 45px;
    height: 45px;
    background: #2c5530;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.sender-info h5 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-weight: 600;
}

.sender-info p {
    color: #6c757d;
    font-size: 14px;
}

.message-time {
    color: #6c757d;
    font-size: 12px;
}

/* Settings Section */
.settings-tabs {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.tab-buttons {
    display: flex;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.tab-btn {
    padding: 15px 25px;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.3s ease;
}

.tab-btn.active,
.tab-btn:hover {
    background: white;
    color: #2c5530;
}

.tab-content {
    padding: 30px;
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.setting-group {
    margin-bottom: 30px;
}

.setting-group h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 18px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #2c5530;
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    background: white;
}

.form-group select:focus {
    outline: none;
    border-color: #2c5530;
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
    resize: vertical;
    font-family: inherit;
}

.form-group textarea:focus {
    outline: none;
    border-color: #2c5530;
    box-shadow: 0 0 0 3px rgba(44, 85, 48, 0.1);
}

.form-group small {
    color: #6c757d;
    font-size: 12px;
    margin-top: 4px;
    display: block;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-actions {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

/* Profile Section */
.profile-section {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.profile-avatar {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 32px;
}

.avatar-container {
    position: relative;
    display: inline-block;
}

.avatar-preview {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #2c5530;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(44, 85, 48, 0.2);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.avatar-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.avatar-upload {
    position: absolute;
    bottom: 0;
    right: 0;
    display: flex;
    gap: 5px;
}

.upload-btn, .remove-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.upload-btn {
    background: #2c5530;
    color: white;
}

.upload-btn:hover {
    background: #1e3a20;
    transform: scale(1.1);
}

.remove-btn {
    background: #e74c3c;
    color: white;
}

.remove-btn:hover {
    background: #c0392b;
    transform: scale(1.1);
}

.profile-badges {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.profile-badge {
    background: #e8f5e8;
    color: #2c5530;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-badge.google {
    background: #e3f2fd;
    color: #1565c0;
}

.profile-badge.email {
    background: #fff3e0;
    color: #ef6c00;
}

.profile-badge.verified {
    background: #e8f5e8;
    color: #2e7d32;
}

.profile-badge.incomplete {
    background: #fff8e1;
    color: #f57c00;
}

.avatar-info {
    flex: 1;
    padding-top: 8px;
}

.avatar-info h5 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 18px;
    font-weight: 600;
}

.avatar-info p {
    color: #6c757d;
    margin: 0 0 12px 0;
    font-size: 14px;
}

/* Users Management */
.users-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.users-stats .stat-item {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e9ecef;
}

.users-stats .stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #2c5530;
    display: block;
    margin-bottom: 5px;
}

.users-stats .stat-label {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

.users-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-header {
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
}

.table-row {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr 1.5fr 1fr;
    gap: 15px;
    padding: 15px 20px;
    align-items: center;
}

.table-header .table-row {
    font-weight: 600;
    color: #2c3e50;
}

.table-body .table-row {
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.2s ease;
}

.table-body .table-row:hover {
    background-color: #f8f9fa;
}

.table-body .table-row:last-child {
    border-bottom: none;
}

.table-cell {
    font-size: 14px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2c5530;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.user-details h6 {
    margin: 0 0 2px 0;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
}

.user-details p {
    margin: 0;
    font-size: 12px;
    color: #6c757d;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.user-actions {
    display: flex;
    gap: 8px;
}

.btn-icon-small {
    padding: 6px 8px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.btn-icon-small.btn-warning {
    background: #fff3cd;
    color: #856404;
}

.btn-icon-small.btn-warning:hover {
    background: #ffeaa7;
}

.btn-icon-small.btn-danger {
    background: #f8d7da;
    color: #721c24;
}

.btn-icon-small.btn-danger:hover {
    background: #f5c6cb;
}

.loading-users {
    padding: 40px;
    text-align: center;
    color: #6c757d;
}

/* Security Controls */
.security-controls {
    margin-bottom: 30px;
}

.control-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 15px;
}

.control-info h5 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 16px;
}

.control-info p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #2c5530;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .profile-avatar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    
    .avatar-info {
        padding-top: 0;
    }
    
    /* Users Table Mobile */
    .users-table {
        border-radius: 12px;
        overflow: hidden;
        margin: 0 -20px;
    }
    
    .table-header {
        display: none;
    }
    
    .table-body .table-row {
        display: block;
        background: white;
        margin-bottom: 15px;
        padding: 20px;
        border-radius: 12px;
        border: 1px solid #e9ecef;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }
    
    .table-cell {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #f8f9fa;
        font-size: 14px;
    }
    
    .table-cell:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
    
    .table-cell::before {
        content: attr(data-label);
        font-weight: 600;
        color: #2c5530;
        font-size: 12px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        min-width: 80px;
    }
    
    .users-stats {
        grid-template-columns: 1fr;
        margin: 0 -20px 25px -20px;
    }
    
    .users-stats .stat-item {
        margin: 0 20px 15px 20px;
        border-radius: 12px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }
    
    /* Security Controls Mobile */
    .control-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
        padding: 25px 20px;
        border-radius: 12px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }
    
    .control-info {
        text-align: center;
    }
    
    .toggle-switch {
        margin: 0 auto;
    }
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 1001;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.3);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-btn {
        display: flex !important;
    }
    
    .sidebar-expand-btn {
        display: none !important;
    }
    
    .content-header {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .header-left {
        justify-content: space-between;
    }
    
    .header-right {
        gap: 10px;
    }
    
    .search-box {
        flex: 1;
    }
    
    .search-box input {
        width: 100%;
        min-width: 0;
    }
    
    .header-actions {
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .page-title {
        font-size: 22px;
    }
    
    .content-section {
        padding: 20px 15px;
    }
    
    .section-header {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .dashboard-widgets {
        grid-template-columns: 1fr;
    }
    
    .org-content {
        grid-template-columns: 1fr;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
    
    .tab-buttons {
        flex-direction: column;
        gap: 0;
        background: white;
        border-radius: 8px 8px 0 0;
        overflow: hidden;
    }
    
    .tab-btn {
        flex: none;
        padding: 15px 20px;
        font-size: 14px;
        text-align: left;
        border-bottom: 1px solid #e9ecef;
        border-radius: 0;
        transition: all 0.3s ease;
    }
    
    .tab-btn:last-child {
        border-bottom: none;
    }
    
    .tab-btn.active {
        background: #2c5530;
        color: white;
        font-weight: 600;
    }
    
    .tab-btn:not(.active):hover {
        background: #f8f9fa;
        color: #2c5530;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Password Input Container */
.password-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-container input {
    padding-right: 45px;
}

.password-input-container .password-toggle {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    color: #7f8c8d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.password-input-container .password-toggle:hover {
    color: #2c3e50;
    background: #f8f9fa;
}


/* Header Homepage Button */
.homepage-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #2e7d32;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.homepage-btn:hover {
    background: #1b5e20;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
    color: white;
    text-decoration: none;
}

.homepage-btn i {
    font-size: 12px;
}

/* Mobile responsive for header homepage button */
@media (max-width: 768px) {
    .homepage-btn span {
        display: none;
    }
    
    .homepage-btn {
        padding: 8px;
        min-width: auto;
    }
}

/* Messages Styles */
.messages-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.messages-stats .stat-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.messages-stats .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    color: #2c5530;
    margin-bottom: 0.5rem;
}

.messages-stats .stat-label {
    color: #666;
    font-size: 0.9rem;
}

.message-item {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.message-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.message-item.unread {
    border-left: 4px solid #2c5530;
    background: #f8fff9;
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.message-sender {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.sender-avatar {
    width: 40px;
    height: 40px;
    background: #2c5530;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.sender-info h5 {
    margin: 0;
    color: #2c3e50;
    font-weight: 600;
}

.sender-email {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.message-meta {
    text-align: right;
}

.message-time {
    color: #666;
    font-size: 0.9rem;
    display: block;
    margin-bottom: 0.5rem;
}

.unread-indicator {
    background: #e74c3c;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
}

.message-subject {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.message-preview {
    color: #666;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.message-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-icon {
    background: none;
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #666;
}

.btn-icon:hover {
    background: #f8f9fa;
    color: #2c3e50;
}

.btn-icon.delete-btn:hover {
    background: #e74c3c;
    color: white;
    border-color: #e74c3c;
}

.no-messages {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.no-messages-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.no-messages h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

/* Message Modal */
.message-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease;
}

.message-modal {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.modal-header h3 {
    margin: 0;
    color: #2c3e50;
}

.close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    padding: 4px;
    border-radius: 4px;
}

.close-modal:hover {
    background: #e9ecef;
}

.modal-body {
    padding: 2rem;
    max-height: 50vh;
    overflow-y: auto;
}

.message-detail {
    margin-bottom: 1.5rem;
}

.message-detail label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.message-detail p {
    margin: 0;
    color: #666;
}

.message-full-text {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 4px;
    border-left: 4px solid #2c5530;
    line-height: 1.6;
    white-space: pre-wrap;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    background: #f8f9fa;
}

/* Mobile Small Screens */
@media (max-width: 480px) {
    .content-header {
        padding: 10px 15px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .content-section {
        padding: 15px 10px;
    }
    
    .homepage-btn span {
        display: none;
    }
    
    .homepage-btn {
        padding: 8px;
        min-width: auto;
    }
    
    .stat-card {
        padding: 20px 15px;
        text-align: center;
        flex-direction: column;
        gap: 10px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .stat-info h3 {
        font-size: 24px;
    }
    
    .widget-header {
        padding: 15px 20px;
    }
    
    .widget-content {
        padding: 20px 15px;
    }
    
    .tab-btn {
        padding: 10px 8px;
        font-size: 12px;
        min-height: 44px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
        min-height: 44px;
        padding: 12px 15px;
    }
    
    .settings-tabs {
        margin: 0 -10px;
        border-radius: 8px;
        box-shadow: none;
        overflow: visible;
    }
    
    .tab-content {
        padding: 25px 20px;
        background: #f8f9fa;
    }
    
    .setting-group {
        background: white;
        border-radius: 12px;
        padding: 25px 20px;
        margin-bottom: 20px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
        border: 1px solid #e9ecef;
    }
    
    .setting-group h4 {
        font-size: 18px;
        margin-bottom: 20px;
        color: #2c5530;
        border-bottom: 2px solid #e8f5e8;
        padding-bottom: 10px;
    }
    
    .form-group {
        margin-bottom: 25px;
    }
    
    .form-group label {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 8px;
        color: #2c3e50;
    }
    
    .form-row {
        display: block;
        gap: 0;
    }
    
    .form-row .form-group:last-child {
        margin-bottom: 0;
    }
    
    /* Profile Section Mobile */
    .profile-section {
        background: white;
        margin: 0 -20px 20px -20px;
        padding: 25px 20px;
        border-radius: 0;
        border-bottom: 1px solid #e9ecef;
    }
    
    .profile-avatar {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
        margin-bottom: 25px;
    }
    
    .avatar-container {
        margin-bottom: 10px;
    }
    
    .avatar-preview {
        width: 100px;
        height: 100px;
        font-size: 30px;
    }
    
    .avatar-info {
        padding-top: 0;
        width: 100%;
    }
    
    .avatar-info h5 {
        font-size: 20px;
        margin-bottom: 5px;
    }
    
    .profile-badges {
        justify-content: center;
        margin-top: 15px;
    }
    
    .password-input-container .password-toggle {
        right: 10px;
        padding: 8px;
        min-width: 36px;
        min-height: 36px;
    }
    
    .btn {
        min-height: 44px;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .btn-icon {
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
    }
    
    .notification-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
    }
    
    .mobile-menu-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
    }
    
    .widget-action {
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
    }
    
    .profile-img {
        width: 44px;
        height: 44px;
    }
    
    .profile-avatar-initials {
        width: 44px;
        height: 44px;
    }
    
    .activity-item {
        padding: 20px 0;
    }
    
    .member-item {
        padding: 20px 0;
    }
    
    /* Messages Section Mobile */
    .messages-stats {
        margin: 0 -20px 25px -20px;
    }
    
    .messages-stats .stat-item {
        margin: 0 20px 15px 20px;
        border-radius: 12px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }
    
    .message-item {
        margin: 0 -20px 20px -20px;
        border-radius: 12px;
        padding: 20px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }
    
    .message-header {
        margin-bottom: 15px;
    }
    
    .message-sender {
        gap: 15px;
        margin-bottom: 10px;
    }
    
    .message-meta {
        margin-top: 10px;
    }
    
    .message-actions {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #f8f9fa;
    }
    
    /* Section Headers Mobile */
    .section-header .header-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .section-header .header-actions .btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
}

/* Logout Modal Styles */
.logout-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
}

.logout-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    overflow: hidden;
    animation: slideIn 0.3s ease;
    border: 1px solid #e9ecef;
}

.logout-modal .modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 30px 30px 20px 30px;
    background: linear-gradient(135deg, #fee 0%, #fef2f2 100%);
    border-bottom: 1px solid #fed7d7;
}

.logout-modal .modal-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    margin-bottom: 15px;
    box-shadow: 0 8px 25px rgba(229, 62, 62, 0.3);
}

.logout-modal .modal-header h3 {
    margin: 0;
    color: #742a2a;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
}

.logout-modal .modal-body {
    padding: 25px 30px;
    text-align: center;
}

.logout-modal .modal-body p {
    margin: 0 0 10px 0;
    color: #2d3748;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
}

.logout-modal .modal-note {
    color: #718096;
    font-size: 14px;
    line-height: 1.4;
}

.logout-modal .modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 30px 30px 30px;
    justify-content: center;
    background: #f8f9fa;
}

.logout-modal .modal-footer .btn {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
}

.logout-modal .btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 2px solid #e2e8f0;
}

.logout-modal .btn-secondary:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    color: #2d3748;
    transform: translateY(-1px);
}

.logout-modal .btn-danger {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    border: 2px solid transparent;
}

.logout-modal .btn-danger:hover {
    background: linear-gradient(135deg, #c53030 0%, #9c2323 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.4);
}

.logout-modal .btn-danger:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Mobile Responsive for Logout Modal */
@media (max-width: 480px) {
    .logout-modal {
        width: 95%;
        margin: 20px;
    }
    
    .logout-modal .modal-header {
        padding: 25px 20px 15px 20px;
    }
    
    .logout-modal .modal-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-bottom: 12px;
    }
    
    .logout-modal .modal-header h3 {
        font-size: 18px;
    }
    
    .logout-modal .modal-body {
        padding: 20px;
    }
    
    .logout-modal .modal-footer {
        flex-direction: column;
        padding: 15px 20px 25px 20px;
    }
    
    .logout-modal .modal-footer .btn {
        width: 100%;
        flex: none;
    }
}

/* Responsive Messages */
@media (max-width: 768px) {
    .message-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .message-meta {
        text-align: left;
    }
    
    .message-actions {
        justify-content: flex-start;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}