/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(58, 142, 186, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(58, 142, 186, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary-dark);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    overflow: hidden;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-dark);
    font-family: 'Space Grotesk', sans-serif;
}

.card-body {
    padding: 25px;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.stat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.stat-card-title {
    font-size: 0.95rem;
    color: #666;
    font-weight: 500;
}

.stat-card-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.4rem;
}

.icon-users {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.icon-doors {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.icon-access {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.icon-alerts {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.stat-card-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--primary-dark);
    font-family: 'Space Grotesk', sans-serif;
    margin-bottom: 10px;
}

.stat-card-change {
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.positive {
    color: var(--success);
}

.negative {
    color: var(--danger);
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

/* Table Styles */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 15px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.table th {
    font-weight: 600;
    color: var(--primary-dark);
    font-size: 0.9rem;
}

.table tr:hover {
    background: rgba(58, 142, 186, 0.05);
}

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

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-success {
    background-color: rgba(76, 175, 80, 0.15);
    color: var(--success);
}

.status-warning {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ff9800;
}

.status-danger {
    background-color: rgba(244, 67, 54, 0.15);
    color: var(--danger);
}

/* Activity List */
.activity-list {
    list-style: none;
}

.activity-item {
    padding: 18px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    align-items: flex-start;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 15px;
    color: white;
    font-size: 1.1rem;
}

.activity-content {
    flex: 1;
}

.activity-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.activity-time {
    font-size: 0.8rem;
    color: #777;
}

/* Form Elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-dark);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(58, 142, 186, 0.1);
}

.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    background-color: white;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%232E4A62' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
}

.checkbox-group, .radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkbox-item, .radio-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-item input, .radio-item input {
    width: 18px;
    height: 18px;
}

.checkbox-item label, .radio-item label {
    font-weight: 400;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab {
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab.active {
    border-bottom-color: var(--primary);
    color: var(--primary);
}

.tab-content {
    display: none;
}

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

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-primary {
    background-color: rgba(58, 142, 186, 0.15);
    color: var(--primary);
}

.badge-success {
    background-color: rgba(76, 175, 80, 0.15);
    color: var(--success);
}

.badge-warning {
    background-color: rgba(255, 193, 7, 0.15);
    color: #ff9800;
}

.badge-danger {
    background-color: rgba(244, 67, 54, 0.15);
    color: var(--danger);
}