@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Montserrat:wght@400;500;600;700&display=swap');

/***** 1. General Base Styles *****/
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f3f3f3;
    color: #333;
    padding-top: 80px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Montserrat', sans-serif;
}

main {
    flex: 1;
    margin-bottom: 2rem;
}

/***** 2. Common Card Styles *****/
.dashboard-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border: none !important;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    contain: layout style paint;
}

.dashboard-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.card-content {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: none;
    margin-bottom: 2rem;
}

.main-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: none !important;
    margin-bottom: 1.5rem;
    padding: 2rem;
}

/***** 3. Hero Section Styles *****/
.hero-section {
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    color: white;
    padding: 3.5rem 3rem;
    border-radius: 20px;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 1;
}

.hero-section::after {
    content: "";
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 180px;
    height: 180px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    z-index: 1;
}

.hero-section h1 {
    position: relative;
    z-index: 1;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    animation: fadeInDown 1s ease;
}

.hero-section h5,
.hero-section p {
    position: relative;
    z-index: 1;
    font-size: 1.4rem;
    opacity: 0.95;
    font-weight: 400;
    max-width: 600px;
    line-height: 1.5;
    animation: fadeInUp 1s ease;
    margin-bottom: 0;
}

.hero-icon {
    font-size: 4rem;
    margin-right: 2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
    animation: pulse 3s infinite;
}

/* Hero Section Variants */
.hero-section.admin {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.hero-section.warning {
    background: linear-gradient(135deg, #e53935 0%, #8e24aa 100%);
}

.hero-section.auth {
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
}

.hero-section.reset {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.hero-section.edit {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

/***** 4. Authentication Styles *****/
.auth-container {
    max-width: 500px;
    margin: 30px auto;
    padding: 0;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border: none;
}

.auth-header {
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    color: white;
    text-align: center;
    padding: 40px 30px;
    position: relative;
    overflow: hidden;
}

.auth-header.reset {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
}

.auth-header.register {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.auth-header.change-password {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
}

.auth-header::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.auth-header h2 {
    margin: 0;
    font-size: 2rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.auth-header p {
    margin: 10px 0 0;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.auth-body {
    padding: 40px 30px;
}

/***** 5. Form Styles *****/
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control,
.form-select {
    border: 2px solid #e8f5e8;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}

.auth-body .form-control {
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 25px;
}

.auth-body .form-control:focus {
    border-color: #4caf50;
    box-shadow: 0 0 0 0.2rem rgba(76, 175, 80, 0.25);
}

.auth-header.reset+.auth-body .form-control:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 107, 0.25);
}

.auth-header.change-password+.auth-body .form-control:focus {
    border-color: #ff9800;
    box-shadow: 0 0 0 0.2rem rgba(255, 152, 0, 0.25);
}

.form-section-title {
    border-bottom: 2px solid #43cea2;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    color: #2e7d32;
    font-weight: 700;
}

.form-check {
    margin: 1rem 0;
}

.form-check-input {
    width: 1.5rem;
    height: 1.5rem;
    border: 2px solid #4caf50;
    border-radius: 5px;
}

.form-check-input:checked {
    background-color: #4caf50;
    border-color: #4caf50;
}

.form-check-label {
    margin-left: 0.5rem;
    color: #2e7d32;
    font-weight: 500;
}

.icon-input {
    position: relative;
}

.icon-input i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #4caf50;
    z-index: 1;
}

.auth-header.reset+.auth-body .icon-input i {
    color: #ff6b6b;
}

.auth-header.change-password+.auth-body .icon-input i {
    color: #ff9800;
}

.icon-input .form-control {
    padding-left: 45px;
}

.help-text {
    font-size: 0.85rem;
    color: #666;
    margin-top: 5px;
}

.info-box {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.welcome-info {
    background: #f8f9fa;
    border-left: 4px solid #4caf50;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 5px;
}

.welcome-info h5 {
    color: #2e7d32;
    margin-bottom: 10px;
}

.welcome-info p {
    margin: 5px 0;
    color: #666;
    font-size: 0.95rem;
}

/***** 6. Button Styles *****/
.btn-primary {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border: none;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #45a049 0%, #388e3c 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
    color: white;
}

.auth-body .btn-primary {
    width: 100%;
    font-size: 1.1rem;
    padding: 12px 30px;
}

.auth-header.reset+.auth-body .btn-primary {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.3);
}

.auth-header.reset+.auth-body .btn-primary:hover {
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

.auth-header.change-password+.auth-body .btn-primary {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.3);
}

.auth-header.change-password+.auth-body .btn-primary:hover {
    box-shadow: 0 8px 20px rgba(255, 152, 0, 0.4);
}

.btn-outline-secondary {
    border: 2px solid #6c757d;
    color: #6c757d;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: transparent;
}

.btn-outline-secondary:hover {
    background: #6c757d;
    color: white;
    transform: translateY(-2px);
}

.auth-body .btn-outline-secondary {
    width: 100%;
    font-size: 1.1rem;
    padding: 12px 30px;
}

.btn-outline-primary {
    background: transparent;
    border: 2px solid #2196f3;
    color: #2196f3;
    border-radius: 15px;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #2196f3;
    color: white;
    transform: translateY(-2px);
}

.btn-outline-warning {
    border: 2px solid #ff9800;
    color: #ff9800;
    border-radius: 25px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-warning:hover {
    background: #ff9800;
    color: white;
    transform: translateY(-2px);
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 15px;
    border: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-toggle {
    background: #ff9800;
    color: white;
}

.btn-toggle:hover {
    background: #f57c00;
    transform: translateY(-2px);
}

.btn-toggle.deactivate {
    background: #f44336;
}

.btn-toggle.deactivate:hover {
    background: #d32f2f;
}

.btn-toggle.activate {
    background: #4caf50;
}

.btn-toggle.activate:hover {
    background: #45a049;
}

.btn-resend {
    background: #2196f3;
    color: white;
}

.btn-resend:hover {
    background: #1976d2;
    transform: translateY(-2px);
}

.details-btn {
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    text-decoration: none;
    transition: all 0.2s;
    font-weight: 500;
    font-size: 0.85rem;
    display: inline-block;
}

.details-btn i {
    margin-right: 0.25rem;
}

.details-btn:hover {
    background: #3d9141;
    color: white;
}

.details-btn:active {
    transform: translateY(1px);
}

/* Special Buttons */
.btn-data-analysis {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.3);
    text-decoration: none;
    display: inline-block;
}

.btn-data-analysis:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
}

.btn-login {
    background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-login:hover {
    color: white;
    transform: translateY(-2px);
}

.btn-partner {
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    margin-right: 0.5rem;
}

.btn-partner:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 206, 162, 0.3);
}

.btn-partner-outline {
    border: 2px solid #43cea2;
    background: transparent;
    color: #43cea2;
    padding: 0.4rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
    margin-right: 0.5rem;
}

.btn-partner-outline:hover {
    background: #43cea2;
    color: white;
}

.actions-row {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/***** 7. Navigation Styles *****/
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

#logo {
    height: 50px;
    transition: all 0.3s ease;
}

.nav-link {
    position: relative;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--accent-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--accent-color);
    transition: all 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

.partner-mode-indicator {
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 8px;
    font-weight: 500;
}

.navbar-brand .partner-logo {
    height: 30px;
    margin-left: 10px;
    background: rgba(255, 255, 255, 0.9);
    padding: 2px 6px;
    border-radius: 4px;
}

.user-dropdown {
    position: relative;
}

.user-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    margin-right: 8px;
}

.user-info {
    color: #2e7d32;
    font-weight: 500;
}

.access-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 5px;
}

.access-badge.all {
    background: #e8f5e9;
    color: #2e7d32;
}

.access-badge.partner {
    background: #fff3e0;
    color: #f57c00;
}

.access-badge.limited {
    background: #fafafa;
    color: #666;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item i {
    width: 20px;
    margin-right: 10px;
}

.language-switcher {
    margin-left: 15px;
}

.language-switcher .dropdown-menu {
    min-width: 100px;
}

.language-switcher .dropdown-item.active {
    background-color: var(--accent-color);
    color: white;
}

.language-flag {
    width: 20px;
    margin-right: 5px;
}

/***** 8. Footer Styles *****/
footer {
    background-color: #f8f9fa;
    margin-top: auto;
}

.footer-links a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--accent-color);
    text-decoration: none;
}

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
}

/***** 9. Admin Styles *****/
.admin-header {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.admin-header::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.admin-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.admin-header p {
    margin: 10px 0 0;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
}

.admin-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    overflow: hidden;
}

.admin-card-header {
    background: #f8f9fa;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
}

.admin-card-header h3 {
    margin: 0;
    color: #2e7d32;
    font-weight: 600;
}

.admin-card-body {
    padding: 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border-bottom: 3px solid transparent;
}

.stat-card:nth-child(1) {
    border-bottom-color: #4caf50;
}

.stat-card:nth-child(2) {
    border-bottom-color: #2196f3;
}

.stat-card:nth-child(3) {
    border-bottom-color: #ff9800;
}

.stat-card:nth-child(4) {
    border-bottom-color: #f44336;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #4caf50;
}

.stat-value {
    color: #2C3E50;
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #2e7d32;
    font-size: 1rem;
    font-weight: 600;
}

.filters-section {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.user-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    position: relative;
}

.user-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.user-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.user-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 0.25rem;
}

.user-email {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.user-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.user-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.user-badge.active {
    background: #e8f5e9;
    color: #2e7d32;
}

.user-badge.inactive {
    background: #ffebee;
    color: #c62828;
}

.user-badge.admin {
    background: #e3f2fd;
    color: #1976d2;
}

.user-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.user-detail {
    font-size: 0.9rem;
    color: #666;
}

.user-detail strong {
    color: #2e7d32;
}

.user-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.invitation-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.invitation-item:hover {
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.invitation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.invitation-email {
    font-weight: 600;
    color: #2e7d32;
    font-size: 1.1rem;
}

.invitation-status {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.invitation-status.pending {
    background: #fff3cd;
    color: #856404;
}

.invitation-status.expired {
    background: #f8d7da;
    color: #721c24;
}

.invitation-status.used {
    background: #d4edda;
    color: #155724;
}

.invitation-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 0.5rem;
}

.invitation-detail {
    font-size: 0.9rem;
    color: #666;
}

.invitation-actions {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.search-results-info {
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #1976d2;
}

/***** 10. Profile Styles *****/
.profile-header {
    background: linear-gradient(135deg, #43cea2 0%, #185a9d 100%);
    color: white;
    padding: 3rem 2rem;
    border-radius: 20px;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: "";
    position: absolute;
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.profile-header h1 {
    margin: 0;
    font-size: 2.5rem;
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.profile-header p {
    margin: 10px 0 0;
    opacity: 0.9;
    position: relative;
    z-index: 1;
    font-size: 1.1rem;
}

.profile-container {
    max-width: 800px;
    margin: 0 auto;
}

.profile-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
    overflow: hidden;
}

.profile-card-header {
    background: #f8f9fa;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e9ecef;
}

.profile-card-header h3 {
    margin: 0;
    color: #2e7d32;
    font-weight: 600;
}

.profile-card-body {
    padding: 2rem;
}

.access-info {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-radius: 5px;
}

.access-info h5 {
    color: #2e7d32;
    margin-bottom: 10px;
}

.access-info p {
    margin: 5px 0;
    color: #666;
}

/***** 11. Partner Styles *****/
.partner-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    border: none;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.partner-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.partner-logo {
    max-width: 100%;
    max-height: 80px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.partner-info h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #2e7d32;
    margin-bottom: 0.5rem;
}

.partner-stats {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
}

.partner-stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.partner-stat-item:last-child {
    margin-bottom: 0;
}

.partner-stat-label {
    color: #666;
    font-weight: 500;
}

.partner-stat-value {
    color: #2e7d32;
    font-weight: 600;
}

.partner-buttons {
    margin-top: 1rem;
}

.partner-energy-stats {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.energy-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.energy-stat-item {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.energy-stat-icon {
    font-size: 2rem;
    color: #43cea2;
    margin-bottom: 0.5rem;
}

.energy-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2e7d32;
    margin-bottom: 0.25rem;
}

.energy-stat-label {
    font-size: 0.9rem;
    color: #666;
    font-weight: 500;
}

/***** 12. Special Sections *****/
.data-analysis-section {
    background: #f0f8ff;
    border: 2px solid #4caf50;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
}

.access-restricted {
    background: #ffebee;
    border: 2px solid #f44336;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1rem;
    text-align: center;
}

.access-restricted h5 {
    color: #d32f2f;
    margin-bottom: 0.5rem;
}

.access-restricted p {
    color: #666;
    margin-bottom: 0;
}

.copy-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid #4caf50;
}

.task-type-section {
    padding: 1.5rem;
    background-color: #fafafa;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.current-image-container {
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem;
    display: inline-block;
}

.current-image {
    max-width: 200px;
    max-height: 200px;
    border-radius: 4px;
}

.current-partner-info {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.current-partner-logo {
    max-width: 100px;
    max-height: 50px;
    object-fit: contain;
}

.inverter-select-section {
    background-color: #f8f9fa;
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border-left: 4px solid #4caf50;
}

/***** 13. Data Analysis Styles *****/
.data-analysis-container {
    max-width: 1200px;
    margin: 0 auto;
}

.control-panel {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.chart-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.data-table-container {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.data-types-header {
    background: #f8f9fa;
    padding: 0.5rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.data-types-checkboxes {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    max-height: 300px;
    overflow-y: auto;
}

.data-type-category {
    margin-bottom: 1rem;
}

.data-type-category:last-child {
    margin-bottom: 0;
}

.data-type-title {
    font-weight: 500;
    color: #2C3E50;
}

.data-type-measure {
    font-size: 0.9em;
    color: #6c757d;
}

.form-check-sm {
    padding-left: 1.25rem;
}

.form-check-sm .form-check-input {
    margin-top: 0.125rem;
}

.btn-group-sm .btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.data-types-checkboxes::-webkit-scrollbar {
    width: 6px;
}

.data-types-checkboxes::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.data-types-checkboxes::-webkit-scrollbar-thumb {
    background: #4CAF50;
    border-radius: 3px;
}

.data-types-checkboxes::-webkit-scrollbar-thumb:hover {
    background: #45a049;
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 3rem;
}

.data-table {
    max-height: 400px;
    overflow-y: auto;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2e7d32;
}

.no-data-message {
    text-align: center;
    padding: 3rem;
    color: #6c757d;
}

.chart-canvas {
    max-height: 400px;
}

.error-message {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.success-message {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/***** 14. Map Styles *****/
.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.custom-marker i {
    transition: transform 0.3s ease;
}

.custom-marker:hover i {
    transform: scale(1.3) translateY(-5px);
}

.custom-popup {
    border-radius: 10px;
    overflow: hidden;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/***** 15. Filter Styles *****/
.filters-section {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.filters-section .form-label {
    color: #2e7d32;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.filters-section .form-label i {
    margin-right: 0.5rem;
}

.filters-section .form-select {
    border-radius: 10px;
    border: 2px solid rgba(46, 125, 50, 0.2);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.filters-section .form-select:focus {
    border-color: #2e7d32;
    box-shadow: 0 0 0 0.25rem rgba(46, 125, 50, 0.15);
}

.filters-section .form-control {
    border-radius: 10px;
    border: 2px solid rgba(46, 125, 50, 0.2);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.filters-section .form-control:focus {
    border-color: #2e7d32;
    box-shadow: 0 0 0 0.25rem rgba(46, 125, 50, 0.15);
}

/***** 16. Card Layout *****/
.inverter-card-wrapper {
    margin-bottom: 0;
}

.inverter-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    background: white;
    transition: none;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.inverter-card .title-section {
    background: #f6fff8;
    border-radius: 10px 10px 0 0;
    padding: 1rem;
    min-height: 5em;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.inverter-card .title-section h5 {
    margin: 0;
    color: #2e7d32;
    font-weight: 600;
    font-size: 1.1rem;
}

.inverter-card .info-section {
    padding: 0.75rem;
    flex-grow: 1;
}

.inverter-card .card-footer {
    padding: 0.5rem 1rem;
    background: transparent;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.location-info {
    font-size: 0.85rem;
    color: #607d8b;
    margin-top: 0.25rem;
}

.location-info i {
    color: #e57373;
    margin-right: 0.25rem;
}

.stat-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: stretch;
}

.stat-item {
    flex: 1;
    background: #f8f9fa;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    position: relative;
    min-width: calc(50% - 0.25rem);
}

.stat-item.full-width {
    width: 100%;
    flex: 0 0 100%;
}

.stat-item.device-type {
    border-left: 3px solid #4caf50;
}

.stat-item .label {
    font-size: 0.75rem;
    margin-bottom: 0.25rem;
    color: #388e3c;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.stat-item .label i {
    margin-right: 0.25rem;
    font-size: 0.875rem;
}

.stat-item .value {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2C3E50;
}

.battery-info {
    margin-bottom: 0.75rem;
}

.battery-info .stat-item {
    background-color: #f1f8e9;
}

.progress-bar {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    margin-top: 0.25rem;
    overflow: hidden;
}

.progress-bar .fill {
    height: 100%;
    background-color: #4caf50;
    transition: width 0.3s ease;
}

.model-square {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 0.25rem;
    vertical-align: middle;
}

.stat-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1rem;
    border-left: 3px solid #f5f5f5;
    padding-left: 0.5rem;
}

/***** 17. Modal Styles *****/
.modal-content {
    border-radius: 15px;
    border: none;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.modal-header {
    background-color: #dc3545;
    color: white;
    border-radius: 15px 15px 0 0;
    border-bottom: none;
}

.modal-footer {
    border-top: none;
}

/***** 18. Table Styles *****/
.table-responsive {
    margin-top: 1rem;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table th,
.table td {
    padding: 1rem;
    vertical-align: middle;
}

.days-badge {
    font-size: 0.9rem;
    padding: 0.5rem 0.7rem;
}

/***** 19. Section Headers *****/
.section-header {
    display: flex;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.section-header i {
    font-size: 1.75rem;
    margin-right: 1rem;
    color: #4caf50;
}

.section-header h4 {
    margin: 0;
    font-weight: 700;
    color: #2e7d32;
    font-size: 1.5rem;
}

/***** 20. Statistics Grid *****/
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    padding: 1.5rem 2rem;
}

.totals-section {
    margin-bottom: 2.5rem;
}

/***** 21. Authentication Links *****/
.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: #4caf50;
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.divider {
    margin: 20px 0;
    text-align: center;
    color: #666;
}

/***** 22. Utility Classes *****/
.spacer {
    height: 150px;
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.hidden {
    display: none;
}

/***** 23. Partner Logo Styles *****/
.partner-logo-hero {
    max-width: 200px;
    max-height: 80px;
}

.partner-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.partner-logo-hero a:hover .partner-logo-img {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/***** 24. Animations *****/
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.7;
    }

    50% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(0.8);
        opacity: 0.7;
    }
}

/***** 25. CSS Variables *****/
:root {
    --primary-color: #2C3E50;
    --secondary-color: #34495E;
    --accent-color: #3498DB;
}

/***** 26. Loading Indicators *****/
.spinner-container {
    position: relative;
    width: 4rem;
    height: 4rem;
    margin: 0 auto;
}

.grafana-loading .spinner-border {
    width: 3rem !important;
    height: 3rem !important;
    position: static !important;
    border-width: 0.25rem !important;
}

.spinner-border {
    width: 3rem !important;
    height: 3rem !important;
    position: static !important;
    border-width: 0.25rem !important;
}

.grafana-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: #f8f9fa;
    border-radius: 15px;
}

.grafana-loading .text-center {
    max-width: 300px;
}

.grafana-frame {
    width: 100%;
    border: none;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
    contain: layout style paint;
}

.grafana-error {
    display: none;
    text-align: center;
    padding: 2rem;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 15px;
    color: #856404;
}

/***** 27. Info Cards *****/
.info-card {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: none;
    margin-bottom: 1rem;
    transition: transform 0.2s ease;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.info-card h4 {
    color: #2e7d32;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.info-card p {
    color: #555;
    margin-bottom: 0.3rem;
}

.info-card .text-muted {
    color: #6c757d !important;
}

.inverter-image {
    border-radius: 10px;
    object-fit: cover;
    max-height: 300px;
}

/***** 28. Responsive Styles *****/
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .stat-group {
        flex-direction: column;
    }

    .stat-item {
        min-width: 100%;
    }

    .hero-section {
        padding: 2.5rem 2rem;
    }

    .hero-section h1 {
        font-size: 2.25rem;
    }

    .hero-section h5,
    .hero-section p {
        font-size: 1.1rem;
    }

    .actions-row {
        flex-direction: column;
    }

    .admin-card-body {
        padding: 1.5rem;
    }

    .edit-user-card-body {
        padding: 1.5rem;
    }

    .profile-card-body {
        padding: 1.5rem;
    }

    .user-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .user-actions {
        width: 100%;
        justify-content: center;
        margin-top: 1rem;
    }

    .user-details {
        flex-direction: column;
        gap: 0.5rem;
    }

    .invitation-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .invitation-details {
        flex-direction: column;
        gap: 0.5rem;
    }

    .invitation-actions {
        flex-direction: column;
    }

    .partner-card {
        margin-bottom: 1rem;
    }

    .partner-buttons {
        text-align: center;
    }

    .btn-partner,
    .btn-partner-outline {
        display: block;
        margin: 0.5rem 0;
        text-align: center;
    }

    .energy-stat-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 768px) {
    .inverter-cards-container {
        grid-template-columns: 1fr;
    }

    .hero-stat {
        min-width: 100%;
    }

    .hero-section {
        padding: 2rem 1.5rem;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .partner-logo-hero {
        max-width: 120px;
        max-height: 50px;
        margin-top: 1rem;
    }

    .navbar-brand {
        margin-bottom: 0 !important;
    }

    #logo {
        height: 40px;
    }

    .navbar-brand .partner-logo {
        height: 25px;
        margin-left: 5px;
    }

    .partner-mode-indicator {
        display: none;
    }

    .user-dropdown .dropdown-toggle {
        padding: 0.25rem 0.5rem;
    }

    .user-info {
        font-size: 0.9rem;
    }

    .access-badge {
        display: none;
    }

    .hero-section {
        padding: 2rem 1.5rem;
    }

    .admin-header {
        padding: 2rem 1rem;
    }

    .admin-header h1 {
        font-size: 2rem;
    }

    .edit-user-header {
        padding: 2rem 1rem;
    }

    .edit-user-header h1 {
        font-size: 2rem;
    }

    .profile-header {
        padding: 2rem 1rem;
    }

    .profile-header h1 {
        font-size: 2rem;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero-section h1 {
        font-size: 1.75rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .section-header {
        padding: 1.25rem;
    }

    .stats-grid {
        padding: 1.25rem;
    }

    .auth-container {
        max-width: 450px;
        margin: 50px auto;
    }
}
