/* Digital Messaging Platform - Main Stylesheet */

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

:root {
    --primary-color: #00bcd4;
    --secondary-color: #2c3e50;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196f3;
    --dark-bg: #37474f;
    --light-bg: #eceff1;
    --sidebar-bg: #2c3e50;
    --sidebar-active: #ff5722;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

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

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

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    width: 100%;
}

.btn-primary:hover {
    background-color: #00acc1;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #45a049;
}

.btn-danger {
    background-color: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background-color: #da190b;
}

.btn-info {
    background-color: var(--info-color);
    color: white;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* Dashboard Layout */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h3 {
    font-size: 18px;
    margin-bottom: 5px;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: white;
    text-decoration: none;
    transition: all 0.3s;
}

.sidebar-menu a:hover {
    background-color: rgba(255,255,255,0.1);
}

.sidebar-menu a.active {
    background-color: var(--sidebar-active);
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
}

.sidebar-menu .submenu {
    display: none;
    background-color: rgba(0,0,0,0.2);
}

.sidebar-menu li.has-submenu.open .submenu {
    display: block;
}

.sidebar-menu .submenu a {
    padding-left: 50px;
    font-size: 13px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    background-color: #f5f5f5;
}

/* Header */
.header {
    background-color: white;
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

.notification-icon {
    position: relative;
    cursor: pointer;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

/* Content Area */
.content {
    padding: 30px;
}

.page-title {
    margin-bottom: 30px;
}

.page-title h1 {
    font-size: 28px;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.page-title p {
    color: #777;
    font-size: 14px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.green {
    background: linear-gradient(135deg, #4caf50, #8bc34a);
}

.stat-icon.blue {
    background: linear-gradient(135deg, #2196f3, #03a9f4);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #ff9800, #ffc107);
}

.stat-icon.red {
    background: linear-gradient(135deg, #f44336, #e91e63);
}

.stat-details h3 {
    font-size: 28px;
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.stat-details p {
    color: #777;
    font-size: 14px;
}

/* Card */
.card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.card-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    font-size: 20px;
    color: var(--secondary-color);
}

.card-body {
    padding: 20px;
}

/* Table */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

table thead {
    background-color: var(--primary-color);
    color: white;
}

table th {
    padding: 12px;
    text-align: left;
    font-weight: 500;
}

table td {
    padding: 12px;
    border-bottom: 1px solid #eee;
}

table tbody tr:hover {
    background-color: #f9f9f9;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background-color: #e8f5e9;
    color: #4caf50;
}

.badge-danger {
    background-color: #ffebee;
    color: #f44336;
}

.badge-warning {
    background-color: #fff3e0;
    color: #ff9800;
}

.badge-info {
    background-color: #e3f2fd;
    color: #2196f3;
}

.badge-secondary {
    background-color: #eceff1;
    color: #607d8b;
}

/* Alert */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #e8f5e9;
    color: #4caf50;
    border-left: 4px solid #4caf50;
}

.alert-danger {
    background-color: #ffebee;
    color: #f44336;
    border-left: 4px solid #f44336;
}

.alert-warning {
    background-color: #fff3e0;
    color: #ff9800;
    border-left: 4px solid #ff9800;
}

.alert-info {
    background-color: #e3f2fd;
    color: #2196f3;
    border-left: 4px solid #2196f3;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 9999;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    border-radius: 10px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--secondary-color);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    text-align: right;
}

.close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 5px;
    justify-content: center;
    margin-top: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    text-decoration: none;
    color: #333;
}

.pagination a:hover {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-250px);
        transition: transform 0.3s;
    }
    
    .sidebar.mobile-show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}
