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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #ecf0f1 0%, #bdc3c7 100%);
    min-height: 100vh;
    padding: 20px;
    padding-bottom: 120px;
    direction: rtl;
}

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

header {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    margin-bottom: 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.header-content > div:first-child {
    flex: 1;
    text-align: center;
}

.language-selector select {
    padding: 10px 20px;
    border: 2px solid #16a085;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    color: #16a085;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-selector select:hover {
    background: #16a085;
    color: white;
}

header h1 {
    color: #16a085;
    font-size: 2.5em;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.2em;
}

.main-nav {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    justify-content: center;
}

.nav-btn {
    padding: 15px 40px;
    border: none;
    border-radius: 10px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    color: #16a085;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.nav-btn.active {
    background: linear-gradient(135deg, #16a085 0%, #27ae60 100%);
    color: white;
}

.section-content {
    display: none;
}

.section-content.active {
    display: block;
}

.zoro-header {
    background: linear-gradient(135deg, #16a085 0%, #27ae60 100%);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 30px;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.zoro-header h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: white;
}

.zoro-header p {
    font-size: 1.2em;
    opacity: 0.95;
}

.main-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 25px;
}

.card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card.full-width {
    grid-column: 1 / -1;
}

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

.card h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.5em;
    border-bottom: 3px solid #16a085;
    padding-bottom: 10px;
}

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

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #16a085;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #16a085 0%, #27ae60 100%);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
}

.btn-info {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.btn-secondary {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

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

.filter-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.filter-section button {
    grid-column: span 1;
}

#recordsDisplay {
    max-height: 600px;
    overflow-y: auto;
}

.record-item {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 10px;
    border-right: 5px solid #16a085;
    transition: all 0.3s ease;
}

.record-item:hover {
    background: #e9ecef;
    transform: translateX(-5px);
}

.record-item.attendance {
    border-right-color: #27ae60;
}

.record-item.leave {
    border-right-color: #3498db;
}

.record-item.mission {
    border-right-color: #9b59b6;
}

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

.record-name {
    font-weight: 700;
    font-size: 1.2em;
    color: #333;
}

.record-type {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    color: white;
}

.record-type.attendance {
    background: #27ae60;
}

.record-type.leave {
    background: #3498db;
}

.record-type.mission {
    background: #9b59b6;
}

.record-details {
    color: #666;
    line-height: 1.8;
}

.record-details strong {
    color: #333;
}

.delete-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    margin-top: 10px;
    transition: all 0.3s ease;
}

.delete-btn:hover {
    background: #ee5a6f;
    transform: scale(1.05);
}

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

.stat-card {
    background: linear-gradient(135deg, #16a085 0%, #27ae60 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.stat-card h3 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.stat-card p {
    font-size: 1.1em;
    opacity: 0.9;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 1.2em;
}

.empty-state::before {
    content: "📭";
    display: block;
    font-size: 3em;
    margin-bottom: 15px;
}

.room-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 5px solid #16a085;
    transition: all 0.3s ease;
}

.room-card:hover {
    transform: translateX(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.room-card.available {
    border-left-color: #27ae60;
}

.room-card.occupied {
    border-left-color: #3498db;
}

.room-card.maintenance {
    border-left-color: #f39c12;
}

.room-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.room-number {
    font-size: 1.5em;
    font-weight: 700;
    color: #333;
}

.room-status-badge {
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    color: white;
}

.room-status-badge.available {
    background: #27ae60;
}

.room-status-badge.occupied {
    background: #3498db;
}

.room-status-badge.maintenance {
    background: #f39c12;
}

.room-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.room-detail-item {
    display: flex;
    flex-direction: column;
}

.room-detail-label {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 5px;
}

.room-detail-value {
    font-size: 1.1em;
    font-weight: 600;
    color: #333;
}

.room-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.room-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.edit-room-btn {
    background: #3498db;
    color: white;
}

.edit-room-btn:hover {
    background: #2980b9;
    transform: scale(1.05);
}

.delete-room-btn {
    background: #ff6b6b;
    color: white;
}

.delete-room-btn:hover {
    background: #ee5a6f;
    transform: scale(1.05);
}

.rooms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

@media (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .filter-section {
        grid-template-columns: 1fr;
    }

    header h1 {
        font-size: 1.8em;
    }

    .subtitle {
        font-size: 1em;
    }

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

    .main-nav {
        flex-direction: column;
    }

    .nav-btn {
        width: 100%;
    }

    .zoro-header h2 {
        font-size: 1.8em;
    }

    .rooms-grid {
        grid-template-columns: 1fr;
    }

    .room-details {
        grid-template-columns: 1fr;
    }
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #16a085;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #27ae60;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    }
}

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

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

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

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #f5576c;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    font-weight: 700;
    animation: pulse 2s infinite;
}

.success-message {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    margin: 15px 0;
    animation: slideInRight 0.5s ease-out;
}

.error-message {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    margin: 15px 0;
    animation: slideInRight 0.5s ease-out;
}

.skeleton {
    background: linear-gradient(
        90deg,
        #f0f0f0 25%,
        #e0e0e0 50%,
        #f0f0f0 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    border-radius: 6px;
    font-size: 0.85em;
    white-space: nowrap;
    z-index: 1000;
    margin-bottom: 5px;
    animation: fadeIn 0.3s ease-out;
}

.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
    margin: 0 5px;
}

.badge-success {
    background: #27ae60;
    color: white;
}

.badge-warning {
    background: #f39c12;
    color: white;
}

.badge-danger {
    background: #e74c3c;
    color: white;
}

.badge-info {
    background: #3498db;
    color: white;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(135deg, #16a085 0%, #27ae60 100%);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px;
    text-align: center;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-contact {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.footer-contact a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.9em;
}

.footer-contact a:hover {
    color: #16a085;
}

.footer-copyright {
    font-size: 0.85em;
    color: #bdc3c7;
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-contact {
        flex-direction: column;
        gap: 10px;
    }
}
