/* Import BYekan Font */
@font-face {
    font-family: 'BYekan';
    src: url('../fonts/BYekan/BYekan.woff2') format('woff2'),
         url('../fonts/BYekan/BYekan.woff') format('woff'),
         url('../fonts/BYekan/BYekan.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.diaco-bbb-panel-active {
    overflow: hidden;
    margin: 0 !important;
    padding: 0 !important;
}

body.diaco-bbb-panel-active #main,
body.diaco-bbb-panel-active #content,
body.diaco-bbb-panel-active .site-header,
body.diaco-bbb-panel-active .site-footer,
body.diaco-bbb-panel-active .site-main,
body.diaco-bbb-panel-active aside,
body.diaco-bbb-panel-active nav:not(.diaco-bbb-nav) {
    display: none !important;
}

/* Main Panel Container */
.diaco-bbb-panel-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    z-index: 999999;
    overflow-y: auto;
    font-family: 'BYekan', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.diaco-bbb-user-panel {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    direction: rtl;
    font-family: 'BYekan', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header */
.diaco-bbb-panel-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 0.625rem 1.25rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.diaco-bbb-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.diaco-bbb-logo {
    font-size: 0.9375rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'BYekan', sans-serif;
}

.diaco-bbb-logo::before {
    content: "📚";
    font-size: 1.3rem;
}

.diaco-bbb-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.diaco-bbb-user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.diaco-bbb-logout-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.diaco-bbb-logout-btn:hover {
    background: rgba(255,255,255,0.3);
}

/* Main Content Area */
.diaco-bbb-panel-main {
    display: flex;
    flex: 1;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    padding: 1.25rem;
    gap: 1.25rem;
    background: transparent;
}

/* Sidebar */
.diaco-bbb-sidebar {
    width: 280px;
    background: white;
    border-radius: 15px;
    padding: 0.9375rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.diaco-bbb-sidebar h2 {
    color: #1e3c72;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    padding-bottom: 0.625rem;
    border-bottom: 2px solid #e0e7ff;
    font-family: 'BYekan', sans-serif;
}

.diaco-bbb-menu {
    list-style: none;
}

.diaco-bbb-menu li {
    margin-bottom: 0.5rem;
}

.diaco-bbb-menu a {
    display: flex;
    align-items: center;
    padding: 0.625rem;
    color: #4b5563;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s;
    font-weight: 500;
    gap: 0.75rem;
}

.diaco-bbb-menu a::before {
    content: "▸";
    color: #667eea;
    font-size: 1.2rem;
}

.diaco-bbb-menu a:hover,
.diaco-bbb-menu a.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateX(-5px);
}

.diaco-bbb-menu a:hover::before,
.diaco-bbb-menu a.active::before {
    color: white;
}

.diaco-bbb-menu-toggle {
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.diaco-bbb-menu-arrow {
    transition: transform 0.3s;
    font-size: 0.8rem;
}

.diaco-bbb-menu-arrow.rotated {
    transform: rotate(180deg);
}

.diaco-bbb-submenu {
    list-style: none;
    padding-right: 1.5rem;
    margin-top: 0.5rem;
}

.diaco-bbb-submenu li {
    margin-bottom: 0.25rem;
}

.diaco-bbb-submenu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #6b7280;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 1.2rem;
    font-weight: 600;
}

.diaco-bbb-submenu a:hover,
.diaco-bbb-submenu a.active {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}

/* Content Area */
.diaco-bbb-content {
    flex: 1;
    background: white;
    border-radius: 15px;
    padding: 1.25rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.diaco-bbb-content h1 {
    color: #1e3c72;
    margin-bottom: 2rem;
    font-size: 1.25rem;
    border-bottom: 3px solid #667eea;
    padding-bottom: 1rem;
    line-height: 1.75;
    font-family: 'BYekan', sans-serif;
}

/* Login/Register Form */
.diaco-bbb-auth-container {
    max-width: 600px;
    width: 100%;
    margin: 3rem auto;
    background: white;
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    font-family: 'BYekan', sans-serif;
}

.diaco-bbb-user-type-selection {
    margin-bottom: 2.5rem;
}

.diaco-bbb-user-type-selection h2 {
    text-align: center;
    color: #1e3c72;
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.diaco-bbb-user-type-selection > div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.diaco-bbb-user-type-btn {
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 15px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 160px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.diaco-bbb-user-type-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.diaco-bbb-user-type-btn:active {
    transform: translateY(-2px);
}

.diaco-bbb-user-type-btn > div:first-child {
    font-size: 3.5rem !important;
    margin-bottom: 1rem !important;
    line-height: 1 !important;
}

.diaco-bbb-user-type-btn > div:last-child {
    font-size: 1.1rem;
    text-align: center;
}

.diaco-bbb-auth-section {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.diaco-bbb-auth-section h2,
.diaco-bbb-auth-section h3 {
    text-align: center;
    color: #1e3c72;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 700;
    font-family: 'BYekan', sans-serif;
}

.diaco-bbb-form-group {
    margin-bottom: 1rem;
}

.diaco-bbb-form-group:last-of-type {
    margin-bottom: 0;
}

.diaco-bbb-form-group label {
    display: block;
    margin-bottom: 0.375rem;
    color: #374151;
    font-weight: 600;
    font-size: 0.95rem;
}

.diaco-bbb-form-group input {
    width: 100%;
    padding: 0.75rem 0.875rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.diaco-bbb-form-group small {
    margin-top: 0.375rem;
    display: block;
    color: #6b7280;
    font-size: 0.85rem;
}

.diaco-bbb-form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.diaco-bbb-btn {
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem !important;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.75rem;
    box-sizing: border-box;
    line-height: normal !important;
}

.diaco-bbb-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.diaco-bbb-btn:active {
    transform: translateY(0);
}

.diaco-bbb-btn-secondary {
    width: 100%;
    padding: 0.875rem !important;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: white !important;
    border: none !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.75rem;
    box-sizing: border-box;
    line-height: normal !important;
    font-family: 'BYekan', sans-serif;
}

.diaco-bbb-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
}

.diaco-bbb-btn-secondary:active {
    transform: translateY(0);
}

/* OTP Send Button - Blue */
#send-otp-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
    color: white !important;
    border: none !important;
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.5rem !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    width: 100% !important;
    display: inline-block !important;
    text-align: center !important;
    text-decoration: none !important;
    margin-top: 0.5rem !important;
    font-family: 'BYekan', sans-serif;
}

#send-otp-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3) !important;
}

#send-otp-btn:active {
    transform: translateY(0) !important;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3) !important;
}

#send-otp-btn:disabled {
    background: #9ca3af !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* OTP Toggle Button - Same size as login button, single line */
#toggle-otp-login {
    font-size: 1rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    padding: 0.875rem !important;
    height: auto !important;
    min-height: auto !important;
    line-height: normal !important;
    margin-top: 0 !important;
    box-sizing: border-box !important;
    font-weight: 600 !important;
    width: auto !important;
    font-family: 'BYekan', sans-serif;
}

/* When buttons are in flex container, ensure same size */
div[style*="display: flex"] > .diaco-bbb-btn,
div[style*="display: flex"] > .diaco-bbb-btn-secondary,
div[style*="display: flex"] > #toggle-otp-login {
    margin-top: 0 !important;
    padding: 0.875rem !important;
    font-size: 1rem !important;
    line-height: normal !important;
    box-sizing: border-box !important;
    font-weight: 600 !important;
    flex: 1 !important;
}

/* Message styles */
#diaco-bbb-auth-message {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 10px;
    font-family: 'BYekan', sans-serif;
}

.diaco-bbb-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.diaco-bbb-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .diaco-bbb-auth-container {
        padding: 2rem 1.5rem;
        margin: 1rem auto;
    }
    
    div[style*="display: flex"] > .diaco-bbb-btn,
    div[style*="display: flex"] > .diaco-bbb-btn-secondary,
    div[style*="display: flex"] > #toggle-otp-login {
        padding: 0.65rem 0.4rem !important;
        font-size: 0.7rem !important;
    }
}

.diaco-bbb-btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
}

.diaco-bbb-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
}

.diaco-bbb-btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

.diaco-bbb-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.diaco-bbb-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.diaco-bbb-message {
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Classes Table (Desktop) / Cards (Mobile) */
.diaco-bbb-classes-table {
    font-family: 'BYekan', sans-serif;
}

.diaco-bbb-classes-table thead th {
    font-family: 'BYekan', sans-serif;
}

.diaco-bbb-classes-table tbody tr {
    font-family: 'BYekan', sans-serif;
}

.diaco-bbb-class-running-row {
    background: #f0fdf4 !important;
    border-left: 4px solid #10b981 !important;
}

.diaco-bbb-class-running-row:hover {
    background: #ecfdf5 !important;
}

/* Table Buttons - Same Size */
.diaco-bbb-classes-table th:last-child {
    text-align: right !important;
    padding-right: 1rem !important;
}

.diaco-bbb-classes-table td:last-child {
    text-align: right !important;
}

.diaco-bbb-classes-table td div[style*="display: flex"] {
    justify-content: flex-end !important;
}

.diaco-bbb-classes-table td div[style*="display: flex"] button,
.diaco-bbb-classes-table td div[style*="display: flex"] a {
    padding: 1rem 1rem !important;
    font-size: 1.1rem !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    font-family: 'BYekan', sans-serif !important;
    white-space: nowrap !important;
    display: inline-block !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
    height: 3.25rem !important;
    min-height: 3.25rem !important;
    vertical-align: middle !important;
    margin: 0 !important;
    text-align: center !important;
    width: 110px !important;
    min-width: 110px !important;
    max-width: 110px !important;
}

.diaco-bbb-classes-table td div[style*="display: flex"] button.diaco-bbb-join-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: white !important;
}

.diaco-bbb-classes-table td div[style*="display: flex"] a[href*="diaco_bbb_action=class"],
.diaco-bbb-classes-table td div[style*="display: flex"] a.diaco-bbb-class-details-link {
    background: #667eea !important;
    color: white !important;
}

/* Class Name Size */
.diaco-bbb-classes-table td strong {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
}

/* Classes List (Mobile) */
.diaco-bbb-classes-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 2rem;
}

.diaco-bbb-class-item {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.diaco-bbb-class-item.diaco-bbb-class-running {
    border-color: #10b981;
    border-width: 3px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.2);
}

.diaco-bbb-class-item-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.diaco-bbb-class-item-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.diaco-bbb-class-item-title h3 {
    color: #1e3c72;
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    font-family: 'BYekan', sans-serif;
}

.diaco-bbb-status-badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: 'BYekan', sans-serif;
    white-space: nowrap;
}

.diaco-bbb-status-running {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 1px solid #10b981;
}

.diaco-bbb-status-idle {
    background: #f3f4f6;
    color: #6b7280;
    border: 1px solid #e5e7eb;
}

/* Legacy class-card for mobile */
.diaco-bbb-class-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s;
    position: relative;
}

.diaco-bbb-class-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px 15px 0 0;
}

.diaco-bbb-class-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.diaco-bbb-class-card h3 {
    color: #1e3c72;
    margin-bottom: 1rem;
    font-size: 1.6rem;
    font-weight: 700;
}

.diaco-bbb-teachers {
    margin: 1rem 0;
    color: #6b7280;
    font-size: 1.15rem;
    line-height: 1.8;
}

.diaco-bbb-teachers strong {
    color: #374151;
    font-size: 1.2rem;
    font-weight: 600;
}

.diaco-bbb-class-actions {
    margin-top: 0;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.diaco-bbb-class-actions .diaco-bbb-btn,
.diaco-bbb-class-actions .diaco-bbb-btn-secondary {
    flex: 1;
    margin-top: 0;
    min-width: 0;
    padding: 0.875rem 1rem !important;
    font-size: 0.95rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-family: 'BYekan', sans-serif;
}

/* Recordings */
.diaco-bbb-recordings {
    margin-top: 2rem;
}

.diaco-bbb-recordings h2 {
    color: #1e3c72;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    font-weight: 700;
}

.diaco-bbb-recordings-list {
    display: grid;
    gap: 1rem;
}

.diaco-bbb-recording-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.3s;
}

.diaco-bbb-recording-item:hover {
    border-color: #667eea;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.diaco-bbb-recording-name {
    flex: 1;
}

.diaco-bbb-recording-name-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s;
}

.diaco-bbb-recording-name-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.diaco-bbb-recording-name-input[readonly] {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Bottom Navigation for Mobile */
.diaco-bbb-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1001;
    padding: 0.5rem 0;
    border-top: 1px solid #e5e7eb;
}

.diaco-bbb-bottom-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: center;
    max-width: 100%;
    margin: 0 auto;
}

.diaco-bbb-bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.25rem;
    text-decoration: none;
    color: #6b7280;
    transition: all 0.3s;
    position: relative;
    gap: 0.25rem;
}

.diaco-bbb-bottom-nav-item .nav-icon {
    font-size: 1.5rem;
    transition: all 0.3s;
}

.diaco-bbb-bottom-nav-item .nav-label {
    font-size: 0.6rem;
    font-weight: 600;
    transition: all 0.3s;
}

.diaco-bbb-bottom-nav-item.active {
    color: #667eea;
}

.diaco-bbb-bottom-nav-item.active .nav-icon {
    transform: scale(1.15);
}

.diaco-bbb-bottom-nav-item:active {
    transform: scale(0.95);
}

/* Responsive */
@media (max-width: 768px) {
    body.diaco-bbb-panel-active {
        padding-bottom: 70px;
    }
    
    .diaco-bbb-panel-wrapper {
        padding-bottom: 70px;
    }
    
    .diaco-bbb-panel-header {
        padding: 0.75rem 1rem;
    }
    
    .diaco-bbb-header-content {
        gap: 0.5rem;
    }
    
    .diaco-bbb-logo {
        font-size: 1rem;
        gap: 0.25rem;
    }
    
    .diaco-bbb-user-info > span {
        display: none;
    }
    
    .diaco-bbb-user-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    /* Mobile: Hide table, show cards */
    .diaco-bbb-classes-table-wrapper {
        display: none;
    }
    
    .diaco-bbb-classes-list {
        display: flex !important;
        gap: 1rem;
    }
    
    .diaco-bbb-class-item {
        padding: 1.25rem;
        border-radius: 12px;
    }
    
    .diaco-bbb-class-item-title {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .diaco-bbb-class-item-title h3 {
        font-size: 1.4rem;
    }
    
    .diaco-bbb-class-actions {
        flex-direction: row !important;
        gap: 0.5rem !important;
        width: 100% !important;
    }
    
    .diaco-bbb-class-actions .diaco-bbb-btn,
    .diaco-bbb-class-actions .diaco-bbb-btn-secondary {
        flex: 1 !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 1rem 1rem !important;
        font-size: 1.1rem !important;
        height: 3.25rem !important;
        min-height: 3.25rem !important;
        border-radius: 6px !important;
        font-weight: 600 !important;
        font-family: 'BYekan', sans-serif !important;
        white-space: nowrap !important;
        display: inline-block !important;
        text-align: center !important;
        line-height: 1.4 !important;
        box-sizing: border-box !important;
    }
    
    .diaco-bbb-logout-btn {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .diaco-bbb-sidebar {
        display: none !important;
    }
    
    .diaco-bbb-panel-main {
        flex-direction: column;
        padding: 1rem;
        padding-bottom: 80px;
        gap: 1rem;
    }
    
    .diaco-bbb-content {
        width: 100%;
        max-width: 100%;
        padding: 1.25rem;
        border-radius: 12px;
    }
    
    .diaco-bbb-content h1 {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
        padding-bottom: 0.75rem;
    }
    
    .diaco-bbb-classes-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .diaco-bbb-class-card {
        padding: 1rem;
        border-radius: 12px;
    }
    
    .diaco-bbb-class-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }
    
    .diaco-bbb-teachers {
        font-size: 0.85rem;
        line-height: 1.6;
    }
    
    .diaco-bbb-teachers strong {
        font-size: 0.9rem;
        display: block;
        margin-bottom: 0.25rem;
    }
    
    .diaco-bbb-class-actions {
        flex-direction: row !important;
        gap: 0.5rem !important;
        margin-top: 1rem;
        width: 100% !important;
    }
    
    .diaco-bbb-class-actions .diaco-bbb-btn,
    .diaco-bbb-class-actions .diaco-bbb-btn-secondary {
        flex: 1 !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 1rem 1rem !important;
        font-size: 1.1rem !important;
        height: 3.25rem !important;
        min-height: 3.25rem !important;
        border-radius: 6px !important;
        font-weight: 600 !important;
        font-family: 'BYekan', sans-serif !important;
        white-space: nowrap !important;
        display: inline-block !important;
        text-align: center !important;
        line-height: 1.4 !important;
        box-sizing: border-box !important;
    }
    
    .diaco-bbb-class-actions button.diaco-bbb-join-btn {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
        color: white !important;
    }
    
    .diaco-bbb-class-actions a.diaco-bbb-btn-secondary {
        background: #667eea !important;
        color: white !important;
    }
    
    .diaco-bbb-class-actions button.diaco-bbb-join-btn {
        background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
        color: white !important;
    }
    
    .diaco-bbb-class-actions a.diaco-bbb-btn-secondary {
        background: #667eea !important;
        color: white !important;
    }
    
    .diaco-bbb-auth-container {
        margin: 1.5rem 1rem;
        padding: 2rem 1.5rem;
        border-radius: 15px;
        max-width: 100%;
    }
    
    .diaco-bbb-form-group {
        margin-bottom: 0.875rem;
    }
    
    .diaco-bbb-form-group label {
        font-size: 0.9rem;
        margin-bottom: 0.375rem;
    }
    
    .diaco-bbb-form-group input {
        padding: 0.625rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .diaco-bbb-btn {
        padding: 0.875rem !important;
        font-size: 1rem !important;
        margin-top: 0.75rem;
    }
    
    .diaco-bbb-btn-secondary {
        padding: 0.875rem !important;
        font-size: 1rem !important;
        margin-top: 0.75rem;
    }
    
    .diaco-bbb-bottom-nav {
        display: block !important;
    }
    
    .diaco-bbb-recordings-list {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .diaco-bbb-recording-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }
    
    .diaco-bbb-recording-name {
        width: 100%;
    }
    
    .diaco-bbb-recording-item .diaco-bbb-btn-secondary,
    .diaco-bbb-recording-item .diaco-bbb-btn-danger {
        width: 100%;
        text-align: center;
    }
}

/* Modal */
.diaco-bbb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.diaco-bbb-modal-content {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    font-family: 'BYekan', sans-serif;
}

.diaco-bbb-close-modal {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    font-family: 'BYekan', sans-serif;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.diaco-bbb-close-modal:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: rotate(90deg);
}

/* Recordings Table Styles */
.diaco-bbb-recordings-table {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    table-layout: auto;
}

/* Make name and description columns equal width on desktop */
@media (min-width: 769px) {
    .diaco-bbb-recordings-table {
        table-layout: fixed;
    }
    
    /* Equal width for name and description columns - slightly larger */
    .diaco-bbb-recordings-table thead th:nth-child(2),
    .diaco-bbb-recordings-table thead th:nth-child(3),
    .diaco-bbb-recordings-table tbody td:nth-child(2),
    .diaco-bbb-recordings-table tbody td:nth-child(3) {
        width: 13%;
    }
    
    /* Class name column */
    .diaco-bbb-recordings-table thead th:nth-child(1),
    .diaco-bbb-recordings-table tbody td:nth-child(1) {
        width: 18%;
    }
    
    /* Date column */
    .diaco-bbb-recordings-table thead th:nth-child(4),
    .diaco-bbb-recordings-table tbody td:nth-child(4) {
        width: 12%;
    }
    
    /* Link column - keep same size */
    .diaco-bbb-recordings-table thead th:nth-child(5),
    .diaco-bbb-recordings-table tbody td:nth-child(5) {
        width: 20%;
    }
    
    /* Management column - reduced */
    .diaco-bbb-recordings-table thead th:nth-child(6),
    .diaco-bbb-recordings-table tbody td:nth-child(6) {
        width: 24%;
    }
}

.diaco-bbb-recordings-table tbody tr:hover {
    background: #f1f5f9 !important;
}

.diaco-bbb-recordings-table tbody tr:nth-child(even) {
    background: #ffffff;
}

.diaco-bbb-recordings-table tbody tr:nth-child(odd) {
    background: #f8fafc;
}

.diaco-bbb-recordings-table input[type="text"] {
    transition: all 0.3s;
}

.diaco-bbb-recordings-table input[type="text"]:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.diaco-bbb-recordings-table button {
    transition: all 0.3s;
}

.diaco-bbb-recordings-table button:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.diaco-bbb-recordings-table button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Button Styles */
.diaco-bbb-btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-family: 'BYekan', sans-serif;
}

.diaco-bbb-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.diaco-bbb-btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Modal Styles */
.diaco-bbb-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.diaco-bbb-modal-content {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.diaco-bbb-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.3s;
}

.diaco-bbb-modal-close:hover {
    color: #374151;
}

.diaco-bbb-form-group {
    margin-bottom: 1.5rem;
}

.diaco-bbb-form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 600;
    font-family: 'BYekan', sans-serif;
}

.diaco-bbb-form-group input,
.diaco-bbb-form-group textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'BYekan', sans-serif;
    transition: all 0.3s;
}

.diaco-bbb-form-group input:focus,
.diaco-bbb-form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Page Header */
.diaco-bbb-page-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}

.diaco-bbb-page-header h1 {
    color: #1e3c72;
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0;
    font-family: 'BYekan', sans-serif;
}

/* Form Container */
.diaco-bbb-form-container {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

/* Form Section */
.diaco-bbb-form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e5e7eb;
}

.diaco-bbb-form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
}

.diaco-bbb-form-section h2 {
    color: #1e3c72;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-family: 'BYekan', sans-serif;
}

/* Form Group Enhancements */
.diaco-bbb-form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.diaco-bbb-form-group label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.diaco-bbb-form-group .description {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    margin-bottom: 0;
    font-style: italic;
}

.diaco-bbb-form-group .required {
    color: #ef4444;
    font-weight: 700;
}

.diaco-bbb-form-group input[readonly] {
    background-color: #f3f4f6;
    cursor: not-allowed;
}

.diaco-bbb-form-group input[disabled] {
    background-color: #f3f4f6;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Select2 in Form */
.diaco-bbb-form-group .select2-container {
    width: 100% !important;
    margin-top: 0.5rem;
}

.diaco-bbb-form-group .select2-container--default .select2-selection--multiple {
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    min-height: 45px;
    padding: 0.25rem;
}

.diaco-bbb-form-group .select2-container--default .select2-selection--multiple:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Form Actions */
.diaco-bbb-form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    justify-content: flex-end;
}

.diaco-bbb-form-actions .diaco-bbb-btn,
.diaco-bbb-form-actions .diaco-bbb-btn-secondary {
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    font-family: 'BYekan', sans-serif;
}

.diaco-bbb-form-actions .diaco-bbb-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.diaco-bbb-form-actions .diaco-bbb-btn:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3d8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.diaco-bbb-form-actions .diaco-bbb-btn-secondary {
    background: #6b7280;
    color: white;
    border: none;
}

.diaco-bbb-form-actions .diaco-bbb-btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(107, 114, 128, 0.3);
}

/* Mobile Styles for Form */
@media screen and (max-width: 768px) {
    .diaco-bbb-form-container {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .diaco-bbb-page-header h1 {
        font-size: 1.5rem;
    }
    
    .diaco-bbb-form-section {
        margin-bottom: 2rem;
        padding-bottom: 1.5rem;
    }
    
    .diaco-bbb-form-section h2 {
        font-size: 1.1rem;
    }
    
    .diaco-bbb-form-actions {
        flex-direction: column;
    }
    
    .diaco-bbb-form-actions .diaco-bbb-btn,
    .diaco-bbb-form-actions .diaco-bbb-btn-secondary {
        width: 100%;
        text-align: center;
    }
}

/* Mobile Styles for Recordings Table */
@media screen and (max-width: 768px) {
    /* Recordings mobile - Table Style */
    .diaco-bbb-recordings-table {
        display: block;
        overflow: visible;
        width: 100%;
        margin: 0;
    }
    
    .diaco-bbb-recordings-table tbody {
        display: block;
        width: 100%;
    }
    
    .diaco-bbb-recordings-table thead {
        display: none;
    }
    
    .diaco-bbb-recordings-table tbody tr {
        display: flex;
        flex-direction: column;
        background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
        border: 2px solid #e5e7eb;
        border-radius: 15px;
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
        box-sizing: border-box;
        padding: 1.25rem;
        margin-bottom: 1.25rem;
        position: relative;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
        transition: all 0.3s;
    }
    
    .diaco-bbb-recordings-table tbody tr::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 15px 15px 0 0;
    }
    
    .diaco-bbb-recordings-table tbody tr:active {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }
    
    .diaco-bbb-recordings-table tbody td {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 0.375rem 0;
        border-bottom: 1px solid #e5e7eb;
        border-left: none !important;
        gap: 0.375rem;
    }
    
    /* Show separate labels for each field - inline like other fields */
    .diaco-bbb-recordings-table tbody td[data-label="نام ضبط شده:"]::before {
        content: attr(data-label) !important;
        font-weight: 600;
        color: #6b7280;
        display: inline !important;
        margin: 0;
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    
    /* Show description label - inline like other fields */
    .diaco-bbb-recordings-table tbody td[data-label="توضیح:"]::before {
        content: attr(data-label) !important;
        font-weight: 600;
        color: #6b7280;
        display: inline !important;
        margin: 0;
        font-size: 0.75rem;
        flex-shrink: 0;
    }
    
    /* Display name and description like other fields - label on left, value on right */
    .diaco-bbb-recordings-table tbody td[data-label="نام ضبط شده:"] {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0.375rem 0 !important;
        border-bottom: 1px solid #e5e7eb !important;
    }
    
    .diaco-bbb-recordings-table tbody td[data-label="توضیح:"] {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0.375rem 0 !important;
        border-top: none !important;
        border-bottom: 1px solid #e5e7eb !important;
    }
    
    /* Display name content in the value column (right side) - like other fields */
    .diaco-bbb-recordings-table tbody td[data-label="نام ضبط شده:"] > div {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 0.375rem !important;
        flex: 1;
        margin: 0;
        direction: ltr !important;
        text-align: right !important;
    }
    
    .diaco-bbb-recordings-table tbody td[data-label="نام ضبط شده:"] .diaco-bbb-recording-name-display {
        font-weight: 400 !important;
        font-size: 0.8125rem !important;
        color: #374151 !important;
        display: inline-block;
        text-align: right !important;
        margin: 0;
        direction: rtl;
        line-height: 1.4;
    }
    
    /* Display description content in the value column (right side) - like other fields */
    .diaco-bbb-recordings-table tbody td[data-label="توضیح:"] > div {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-end !important;
        gap: 0.375rem !important;
        flex: 1;
        margin: 0;
        direction: ltr !important;
        text-align: right !important;
    }
    
    .diaco-bbb-recordings-table tbody td[data-label="توضیح:"] .diaco-bbb-recording-description-display {
        color: #374151 !important;
        font-size: 0.8125rem !important;
        font-weight: 400 !important;
        line-height: 1.4;
        display: inline-block;
        text-align: right !important;
        margin: 0;
        direction: rtl;
    }
    
    /* Position edit buttons on the right side (next to the value) */
    .diaco-bbb-recordings-table tbody td[data-label="نام ضبط شده:"] .diaco-bbb-edit-name-btn {
        order: 2;
        margin: 0;
        flex-shrink: 0;
    }
    
    .diaco-bbb-recordings-table tbody td[data-label="توضیح:"] .diaco-bbb-edit-description-btn {
        order: 2;
        margin: 0;
        flex-shrink: 0;
    }
    
    .diaco-bbb-recordings-table tbody td:last-child {
        border-bottom: none;
    }
    
    .diaco-bbb-recordings-table tbody td::before {
        content: attr(data-label);
        font-weight: 600;
        color: #6b7280;
        font-size: 0.75rem;
        display: inline;
        white-space: nowrap;
        flex-shrink: 0;
        text-align: right;
        direction: rtl;
    }
    
    /* Content in recordings table cells - RTL */
    .diaco-bbb-recordings-table tbody td > *:not(::before) {
        direction: rtl;
        text-align: right;
        flex: 1;
    }
    
    /* Override for name and description cells to align values properly */
    .diaco-bbb-recordings-table tbody td[data-label="نام ضبط شده:"] > *:not(::before),
    .diaco-bbb-recordings-table tbody td[data-label="توضیح:"] > *:not(::before) {
        flex: 1;
        text-align: right !important;
    }
    
    .diaco-bbb-recordings-table input[type="text"] {
        width: 100%;
        margin-top: 0.25rem;
    }
    
    .diaco-bbb-recordings-table button {
        width: auto;
        margin-top: 0;
        flex-shrink: 0;
    }
    
    /* Recording actions buttons in one line - centered on mobile */
    .diaco-bbb-recordings-table tbody td[data-label="مدیریت:"] > div {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        gap: 0.5rem !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .diaco-bbb-recordings-table tbody td[data-label="مدیریت:"] button {
        width: auto !important;
        margin: 0 !important;
        padding: 0.5rem !important;
        font-size: 1.3rem !important;
    }
    
    .diaco-bbb-recordings-table tbody td[data-label="پیوند:"] a {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
        padding: 0.75rem 1rem;
    }
}

/* Hide WordPress default elements when panel is active */
body.diaco-bbb-panel-active .site-header,
body.diaco-bbb-panel-active .site-footer,
body.diaco-bbb-panel-active .site-main > *:not(.diaco-bbb-panel-wrapper) {
    display: none !important;
}
