/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
    padding: 20px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-info h1 {
    color: #2c3e50;
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.header-info p {
    color: #7f8c8d;
    font-size: 1.1rem;
}

.session-badge {
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Breadcrumb */
.breadcrumb {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 15px 25px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.breadcrumb a {
    color: #3498db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb a:hover {
    color: #e74c3c;
}

.breadcrumb span {
    color: #7f8c8d;
    margin: 0 10px;
}

/* Update Info */
.update-info {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-right: 4px solid #3498db;
}

.update-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    color: #7f8c8d;
    font-size: 0.9rem;
}

.last-updated-by {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(52, 152, 219, 0.1);
    padding: 8px 15px;
    border-radius: 20px;
}

/* Layout */
.main-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

.left-panel {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.right-panel {
    display: flex;
    flex-direction: column;
    gap: 30px;
    position: sticky;
    top: 20px;
    height: fit-content;
}

/* Card */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(189, 195, 199, 0.2);
}

.card-title {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background: rgba(52, 152, 219, 0.05);
    border-radius: 12px;
}

.info-label {
    color: #7f8c8d;
    font-size: 0.9rem;
    font-weight: 500;
}

.info-value {
    color: #2c3e50;
    font-weight: 600;
    font-size: 1rem;
}

/* Status */
.status-badge {
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: fit-content;
}

.status-upcoming {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
}

.status-completed {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
}

.status-postponed {
    background: rgba(241, 196, 15, 0.2);
    color: #f39c12;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(45deg, #3498db, #2980b9);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.btn-success {
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
}

.btn-danger {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 2px solid #3498db;
    color: #3498db;
}

.btn-outline:hover {
    background: #3498db;
    color: white;
}

/* Tables */
.email-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.email-table th,
.email-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid rgba(189, 195, 199, 0.2);
}

.email-table th {
    background: rgba(52, 152, 219, 0.1);
    color: #2c3e50;
    font-weight: 600;
}

.email-direction {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.direction-in {
    background: rgba(39, 174, 96, 0.2);
    color: #27ae60;
}

.direction-out {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

/* Stages */
.stages-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stage-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(155, 89, 182, 0.05);
    border-radius: 12px;
    border-right: 4px solid #9b59b6;
}

.stage-number {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(45deg, #9b59b6, #8e44ad);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.stage-content {
    flex: 1;
}

.stage-title {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 3px;
}

.stage-date {
    color: #7f8c8d;
    font-size: 0.85rem;
}

/* Attachments */
.attachments-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.attachment-group {
    border: 2px dashed rgba(52, 152, 219, 0.3);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.attachment-group:hover {
    border-color: #3498db;
    background: rgba(52, 152, 219, 0.05);
}

.attachment-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 15px;
}

.attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
}

/* Notifications */
.notification-templates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.notification-btn {
    padding: 15px;
    text-align: center;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(52, 152, 219, 0.1);
    color: #3498db;
    border: 2px solid rgba(52, 152, 219, 0.2);
}

.notification-btn:hover {
    background: #3498db;
    color: white;
}

/* Textarea */
.textarea {
    width: 100%;
    min-height: 200px;
    padding: 15px;
    border: 2px solid rgba(189, 195, 199, 0.3);
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 350px;
    height: 500px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(450px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.chat-widget.open {
    transform: translateY(0);
}

.chat-toggle {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #3498db, #2980b9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.3);
    transition: all 0.3s ease;
    z-index: 1001;
}

.chat-toggle:hover {
    transform: scale(1.1);
}

/* Activity Log */
.activity-log {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid rgba(189, 195, 199, 0.2);
}

.activity-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
}

.activity-content {
    flex: 1;
}

.activity-title {
    color: #2c3e50;
    font-weight: 600;
    margin-bottom: 3px;
}

.activity-date {
    color: #7f8c8d;
    font-size: 0.85rem;
}

/* AI Assistant */
.ai-assistant {
    background: linear-gradient(45deg, #8e44ad, #9b59b6);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.ai-assistant h3 {
    margin-bottom: 10px;
}

.ai-assistant p {
    margin-bottom: 15px;
    opacity: 0.9;
}

/* Countdown */
.countdown {
    background: linear-gradient(45deg, #e74c3c, #c0392b);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
}

.countdown-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

/* Attorney Change */
.attorney-change {
    background: rgba(241, 196, 15, 0.1);
    border: 2px solid rgba(241, 196, 15, 0.3);
    border-radius: 12px;
    padding: 15px;
    margin-top: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .main-layout {
        grid-template-columns: 1fr;
    }

    .right-panel {
        position: static;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .attachments-section {
        grid-template-columns: 1fr;
    }

    .notification-templates {
        grid-template-columns: 1fr;
    }

    .chat-widget {
        width: 90%;
        left: 5%;
        right: 5%;
    }
}

/* Tabs */
.tabs {
    display: flex;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.tab {
    flex: 1;
    padding: 15px;
    background: rgba(189, 195, 199, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: #7f8c8d;
    font-weight: 600;
}

.tab.active {
    background: #3498db;
    color: white;
}

.tab-content {
    display: none;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0 0 12px 12px;
}

.tab-content.active {
    display: block;
}

/* Memo Viewer */
.memo-viewer {
    background: rgba(248, 249, 250, 0.8);
    border: 2px solid rgba(189, 195, 199, 0.3);
    border-radius: 12px;
    padding: 20px;
    min-height: 300px;
}

/* Online Editor */
.online-editor {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.editor-toolbar {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: rgba(236, 240, 241, 0.5);
    border-radius: 8px;
}

.toolbar-btn {
    width: 35px;
    height: 35px;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.8);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.toolbar-btn:hover {
    background: #3498db;
    color: white;
}
