* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #808080;
    min-height: 100vh;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #808080;
}

.login-box {
    background-color: #f5f5f5;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #000;
    font-size: 28px;
    font-weight: bold;
}

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

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

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #000;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background-color: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.login-btn:hover {
    background-color: #333;
}

.error-message {
    background-color: #ffebee;
    color: #c62828;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    display: none;
}

.main-container {
    display: flex;
    min-height: 100vh;
    background-color: #808080;
}

.sidebar {
    width: 200px;
    background-color: #808080;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-right: 3px solid #666;
}

.sidebar-item {
    background-color: #f5f5f5;
    border: 2px solid #666;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    font-weight: bold;
    color: #000;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-item:hover {
    background-color: #e0e0e0;
}

.sidebar-item.active {
    background-color: #000;
    color: #fff;
    border-color: #000;
}

.sidebar-item-tall {
    min-height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-item.has-submenu {
    position: relative;
}

.submenu {
    display: none;
    flex-direction: column;
    gap: 5px;
    margin-top: 10px;
}

.submenu.show {
    display: flex;
}

.submenu-item {
    background-color: #fff;
    border: 1px solid #666;
    border-radius: 5px;
    padding: 8px 10px;
    text-align: left;
    font-size: 13px;
    color: #000;
    cursor: pointer;
    text-decoration: none;
}

.submenu-item:hover {
    background-color: #f0f0f0;
}

.content {
    flex: 1;
    padding: 20px 25px;
    background-color: #808080;
}

.stats-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background-color: #fff;
    border-radius: 15px;
    padding: 25px 50px;
    text-align: center;
    flex: 1;
}

.stat-card h3 {
    font-size: 16px;
    color: #333;
    margin-bottom: 10px;
}

.stat-card .value {
    font-size: 72px;
    font-weight: bold;
    color: #000;
}

.section-card {
    background-color: #b0b0b0;
    border-radius: 15px;
    padding: 30px 35px;
    margin-bottom: 25px;
    min-height: 180px;
}

.section-card h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #000;
}

.info-box {
    background-color: #fff;
    border: 2px dashed #888;
    border-radius: 10px;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
}

.info-box span {
    font-size: 20px;
    color: #000;
    font-weight: 500;
}

.page-header {
    background-color: #fff;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 2px solid #666;
}

.page-header h2 {
    font-size: 18px;
    color: #000;
}

.action-bar {
    background-color: #a0a0a0;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border: 2px solid #666;
}

.btn {
    padding: 10px 25px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-dark {
    background-color: #000;
    color: #fff;
}

.btn-dark:hover {
    background-color: #333;
}

.btn-cancel {
    background-color: #fff;
    color: #000;
    border: 2px solid #666;
}

.btn-cancel:hover {
    background-color: #f0f0f0;
}

.btn-upload {
    background-color: #fff;
    color: #000;
    border: 2px solid #666;
    cursor: pointer;
    white-space: nowrap;
}

.btn-upload:hover {
    background-color: #f0f0f0;
}

.input-with-button {
    display: flex;
    gap: 10px;
    align-items: center;
    flex: 1;
}

.input-with-button .form-input {
    flex: 1;
}

.file-name {
    font-size: 14px;
    color: #666;
}

.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
}

.search-input {
    padding: 10px 15px;
    border: 2px solid #666;
    border-radius: 5px;
    font-size: 14px;
    background-color: #fff;
}

.search-input:focus {
    outline: none;
    border-color: #333;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #666;
}

.data-table thead {
    background-color: #d0d0d0;
}

.data-table th {
    padding: 12px 15px;
    text-align: left;
    font-weight: bold;
    color: #000;
    font-size: 14px;
    border-bottom: 2px solid #666;
}

.data-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #ddd;
    color: #333;
    font-size: 14px;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover {
    background-color: #f5f5f5;
}

.action-btn {
    background: #fff;
    border: 1px solid #666;
    border-radius: 4px;
    padding: 5px 8px;
    cursor: pointer;
    margin-right: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover {
    background-color: #e0e0e0;
}

.action-btn svg {
    width: 16px;
    height: 16px;
    stroke: #333;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-overlay.show {
    display: flex;
}

.modal {
    background-color: #a0a0a0;
    border-radius: 10px;
    padding: 25px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid #666;
}

.modal h2 {
    margin-bottom: 20px;
    color: #000;
}

.modal .form-group {
    margin-bottom: 15px;
}

.modal .form-group label {
    color: #000;
    font-weight: bold;
}

.modal .form-group input,
.modal .form-group select {
    width: 100%;
    padding: 10px;
    border: 2px solid #666;
    border-radius: 5px;
    font-size: 14px;
    background-color: #fff;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.btn-cancel {
    background-color: #666;
    color: #fff;
}

.btn-cancel:hover {
    background-color: #555;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #333;
}

.form-card {
    background-color: #a0a0a0;
    border-radius: 10px;
    padding: 25px;
    border: 2px solid #666;
}

.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.form-label {
    width: 130px;
    font-weight: bold;
    color: #000;
    text-align: right;
    padding-right: 15px;
}

.form-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #666;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
}

.form-input:focus {
    outline: none;
    border-color: #333;
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background-color: #333;
    color: #fff;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s ease;
    min-width: 280px;
}

.toast.success {
    background-color: #2e7d32;
}

.toast.error {
    background-color: #c62828;
}

.toast.info {
    background-color: #1565c0;
}

.toast-icon {
    width: 20px;
    height: 20px;
}

.toast-message {
    flex: 1;
    font-size: 14px;
}

.toast-close {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 5px;
    opacity: 0.7;
}

.toast-close:hover {
    opacity: 1;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

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

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.view-modal {
    background-color: #a0a0a0;
    border-radius: 10px;
    padding: 20px;
    width: 100%;
    max-width: 550px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    border: 2px solid #666;
}

.view-modal-header {
    background-color: #fff;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 2px solid #666;
    flex-shrink: 0;
}

.view-modal-header h2 {
    font-size: 16px;
    color: #000;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.view-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.view-modal-content {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    border: 2px solid #666;
    overflow-y: auto;
    flex: 1;
}

.view-detail-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.view-detail-row:last-child {
    border-bottom: none;
}

.view-detail-label {
    width: 130px;
    font-weight: bold;
    color: #333;
}

.view-detail-value {
    flex: 1;
    color: #000;
}

.filter-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.filter-group label {
    font-size: 14px;
    font-weight: bold;
    color: #000;
}

.filter-input {
    padding: 10px 15px;
    border: 2px solid #666;
    border-radius: 5px;
    font-size: 14px;
    background-color: #fff;
    min-width: 150px;
}

.filter-input:focus {
    outline: none;
    border-color: #333;
}

.setting-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.setting-box {
    background-color: #d0d0d0;
    border-radius: 10px;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 280px;
}

.setting-label {
    font-size: 14px;
    font-weight: bold;
    color: #000;
}

.setting-value {
    display: flex;
    align-items: center;
    gap: 5px;
}

.setting-input {
    width: 80px;
    padding: 10px;
    border: none;
    border-radius: 5px;
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    background-color: #e8e8e8;
}

.setting-input:focus {
    outline: none;
}

.setting-arrows {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.arrow-btn {
    background: none;
    border: none;
    padding: 2px;
    cursor: pointer;
    color: #666;
}

.arrow-btn:hover {
    color: #000;
}

.plan-details {
    background-color: #fff;
    border-radius: 10px;
    padding: 20px;
}

.plan-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #ddd;
}

.plan-row:last-child {
    border-bottom: none;
}

.plan-label {
    font-size: 16px;
    color: #333;
}

.plan-value {
    font-size: 16px;
    font-weight: bold;
    color: #000;
}

.charts-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.chart-card {
    background-color: #fff;
    border-radius: 15px;
    padding: 20px;
    flex: 1;
    min-width: 300px;
    min-height: 300px;
}

.chart-header {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.pie-chart-container {
    width: 150px;
    height: 150px;
}

.line-chart-container {
    height: 250px;
}

.bar-chart-container {
    height: 200px;
}

.chart-title {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin-bottom: 15px;
}

.chart-with-legend {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}

.legend-label {
    font-size: 14px;
    color: #333;
    min-width: 80px;
}

.legend-value {
    font-size: 14px;
    font-weight: bold;
    color: #000;
}

.summary-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.summary-label {
    font-size: 16px;
    color: #333;
}

.summary-value {
    font-size: 24px;
    font-weight: bold;
    color: #000;
}

.chart-data-row {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.data-item {
    text-align: center;
}

.data-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.data-value {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #000;
}

.chart-card.full-width {
    width: 100%;
    flex: none;
}

.message-header {
    margin-bottom: 20px;
}

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

.message-label {
    display: block;
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin-bottom: 10px;
}

.message-select {
    width: 100%;
    padding: 15px;
    border: 2px solid #999;
    border-radius: 8px;
    font-size: 16px;
    background-color: #d0d0d0;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
}

.message-select:focus {
    outline: none;
    border-color: #666;
}

.message-input {
    width: 100%;
    padding: 15px;
    border: 2px solid #999;
    border-radius: 8px;
    font-size: 16px;
    background-color: #d0d0d0;
    box-sizing: border-box;
}

.message-input:focus {
    outline: none;
    border-color: #666;
}

.message-textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid #999;
    border-radius: 8px;
    font-size: 16px;
    background-color: #d0d0d0;
    resize: vertical;
    min-height: 120px;
    box-sizing: border-box;
    font-family: inherit;
}

.message-textarea:focus {
    outline: none;
    border-color: #666;
}

.char-count {
    display: block;
    font-size: 14px;
    color: #666;
    margin-top: 5px;
}

.history-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.history-item {
    background-color: #f5f5f5;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #333;
}

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

.history-date {
    font-size: 12px;
    color: #666;
}

.history-meta {
    font-size: 13px;
    color: #888;
    margin-bottom: 8px;
}

.history-message {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.terms-container {
    background-color: #fff;
    border-radius: 15px;
    padding: 30px;
    min-height: calc(100vh - 60px);
}

.terms-content {
    height: 100%;
    overflow-y: auto;
}

.terms-title {
    font-size: 24px;
    font-weight: bold;
    color: #000;
    margin-bottom: 20px;
}

.terms-heading {
    font-size: 18px;
    font-weight: bold;
    color: #000;
    margin-top: 25px;
    margin-bottom: 10px;
}

.terms-paragraph {
    font-size: 15px;
    color: #333;
    line-height: 1.7;
    margin-bottom: 15px;
    text-align: justify;
}

.terms-list {
    margin: 10px 0;
    padding-left: 25px;
}

.terms-list li {
    font-size: 15px;
    color: #333;
    line-height: 1.7;
    margin-bottom: 8px;
}

.terms-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
}

.terms-textarea {
    width: 100%;
    height: 400px;
    padding: 15px;
    border: 2px solid #999;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
}

/* Subscription Form Styles */
.subscription-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 10px;
}

.subscription-form-label {
    width: 160px;
    font-weight: bold;
    color: #000;
    text-align: right;
    padding-right: 20px;
    flex-shrink: 0;
}

.subscription-form-input {
    flex: 1;
    padding: 10px 15px;
    border: 2px solid #999;
    border-radius: 4px;
    font-size: 14px;
    background-color: #fff;
}

.subscription-form-input:focus {
    outline: none;
    border-color: #333;
}

/* Confirmation Modal Styles */
.confirm-modal {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: none;
}

.confirm-modal-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border-radius: 50%;
}

.confirm-modal-icon svg {
    width: 40px;
    height: 40px;
    stroke: #059669;
}

.confirm-modal h2 {
    font-size: 22px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 12px;
}

.confirm-modal-text {
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 8px;
    line-height: 1.5;
}

.confirm-modal-name {
    font-weight: 700;
    font-size: 18px;
    color: #111827;
    margin-bottom: 20px;
}

.confirm-modal-info {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #ecfdf5;
    color: #059669;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 25px;
}

.confirm-modal-info svg {
    width: 18px;
    height: 18px;
}

.confirm-modal-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.confirm-modal-actions .btn {
    min-width: 120px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.confirm-modal-actions .btn-cancel {
    background-color: #f3f4f6;
    color: #374151;
    border: none;
}

.confirm-modal-actions .btn-cancel:hover {
    background-color: #e5e7eb;
}

.confirm-modal-actions .btn-confirm {
    background-color: #059669;
    color: #fff;
    border: none;
}

.confirm-modal-actions .btn-confirm:hover {
    background-color: #047857;
}

/* Class Badge Style */
.class-badge {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin: 2px;
}