* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    flex-wrap: wrap;
    gap: 10px;
}

h1 {
    color: #333;
    font-size: 28px;
}

h2 {
    color: #333;
    font-size: 20px;
    margin-bottom: 15px;
}

.back-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

.notification-badge {
    position: relative;
    cursor: pointer;
    font-size: 28px;
}

.badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #ff4444;
    color: white;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 12px;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

.badge.hidden {
    display: none;
}

.announcements-container {
    max-height: 600px;
    overflow-y: auto;
}

.announcement-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s;
}

.announcement-card:hover {
    transform: translateX(5px);
}

.announcement-card.priority-high {
    border-left-color: #ff4444;
    background: #fff5f5;
}

.announcement-card.priority-normal {
    border-left-color: #667eea;
}

.announcement-card.priority-low {
    border-left-color: #28a745;
    background: #f0fdf4;
}

.announcement-card .title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.announcement-card .content {
    color: #555;
    line-height: 1.6;
    margin-bottom: 10px;
}

.announcement-card .meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #999;
    flex-wrap: wrap;
    gap: 5px;
}

.announcement-card .timestamp {
    font-size: 12px;
    color: #999;
}

.announcement-card .priority-tag {
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.priority-tag.high {
    background: #ff4444;
    color: white;
}

.priority-tag.normal {
    background: #667eea;
    color: white;
}

.priority-tag.low {
    background: #28a745;
    color: white;
}

.admin-panel {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .admin-panel {
        grid-template-columns: 1fr;
    }
}

.create-announcement {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.create-announcement h2 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5a6fd6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-danger {
    background: #ff4444;
    color: white;
    padding: 5px 12px;
    font-size: 12px;
}

.btn-danger:hover {
    background: #cc0000;
}

.manage-announcements h2 {
    margin-bottom: 20px;
    font-size: 20px;
    color: #333;
}

.admin-announcement-item {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-announcement-item .info h4 {
    color: #333;
    margin-bottom: 4px;
}

.admin-announcement-item .info p {
    color: #666;
    font-size: 14px;
}

.admin-announcement-item .actions {
    display: flex;
    gap: 8px;
}

.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 15px 20px;
    transform: translateX(120%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    max-width: 400px;
    z-index: 1000;
}

.toast.show {
    transform: translateX(0);
}

.toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast-icon {
    font-size: 24px;
}

.toast-message {
    color: #333;
    font-size: 14px;
    line-height: 1.4;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #999;
}

.empty-state .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.announcements-container::-webkit-scrollbar {
    width: 6px;
}

.announcements-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.announcements-container::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: white;
    border-radius: 8px;
    margin-bottom: 8px;
}

.user-item .user-info strong {
    color: #333;
}

.user-item .user-info .role-badge {
    margin-left: 10px;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    color: white;
}

.role-badge.super_admin {
    background: #ff4444;
}

.role-badge.admin {
    background: #667eea;
}

.role-badge.employee {
    background: #28a745;
}

.user-item .user-info .dept {
    margin-left: 10px;
    font-size: 12px;
    color: #999;
}

.highlight {
    background: #ffeb3b;
    padding: 0 2px;
}