/* FILE: /public/assets/css/style.css */

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

/* App Container */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #2c3e50;
    color: #ecf0f1;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 24px 20px;
    border-bottom: 1px solid #34495e;
}

.sidebar-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #fff;
}

.tenant-name {
    font-size: 12px;
    color: #95a5a6;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: #ecf0f1;
    text-decoration: none;
    transition: background 0.2s;
}

.nav-link:hover {
    background: #34495e;
}

.nav-link span {
    margin-right: 12px;
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #34495e;
}

.user-info {
    margin-bottom: 12px;
}

.user-info strong {
    display: block;
    font-size: 14px;
}

.user-info small {
    color: #95a5a6;
    font-size: 12px;
}

.btn-logout {
    display: block;
    width: 100%;
    padding: 8px;
    text-align: center;
    background: #e74c3c;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
}

.btn-logout:hover {
    background: #c0392b;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 0;
    overflow-y: auto;
}

.content-header {
    padding: 24px 32px;
    background: #fff;
    border-bottom: 1px solid #e1e8ed;
}

.content-header h2 {
    font-size: 24px;
    font-weight: 600;
}

.content-body {
    padding: 32px;
}

/* Alerts */
.alert {
    padding: 12px 16px;
    margin-bottom: 20px;
    border-radius: 4px;
    border-left: 4px solid;
}

.alert-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.alert-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 24px;
    font-weight: 600;
}

.page-actions {
    display: flex;
    gap: 12px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #4CAF50;
    color: #fff;
    border-color: #4CAF50;
}

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

.btn-secondary {
    background: #6c757d;
    color: #fff;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

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

.btn-block {
    display: block;
    width: 100%;
}

/* Card */
.card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

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

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

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

.form-group small {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #6c757d;
}

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

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.checkbox-label input {
    margin-right: 8px;
}

/* Tables */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e1e8ed;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    color: #6c757d;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d;
}

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

.badge-subscribed {
    background: #d4edda;
    color: #155724;
}

.badge-unsubscribed {
    background: #f8d7da;
    color: #721c24;
}

.badge-draft {
    background: #e2e3e5;
    color: #383d41;
}

.badge-sent,
.badge-active {
    background: #d4edda;
    color: #155724;
}

.badge-email {
    background: #cfe2ff;
    color: #084298;
}

.badge-sms {
    background: #fff3cd;
    color: #664d03;
}

.badge-social {
    background: #f8d7da;
    color: #842029;
}

/* Dashboard */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.kpi-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.kpi-card h3 {
    font-size: 14px;
    font-weight: 500;
    color: #6c757d;
    margin-bottom: 8px;
}

.kpi-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.kpi-change {
    font-size: 13px;
    color: #28a745;
}

.kpi-meta {
    font-size: 12px;
    color: #6c757d;
}

.dashboard-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

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

.guest-container {
    width: 100%;
    max-width: 500px;
    padding: 20px;
}

.guest-header {
    text-align: center;
    color: #fff;
    margin-bottom: 32px;
}

.guest-header h1 {
    font-size: 32px;
    margin-bottom: 8px;
}

.guest-header p {
    font-size: 16px;
    opacity: 0.9;
}

.guest-content {
    margin-bottom: 24px;
}

.auth-card {
    background: #fff;
    padding: 32px;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.auth-card h2 {
    font-size: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.auth-links {
    margin-top: 20px;
    text-align: center;
}

.demo-credentials {
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 13px;
}

.demo-credentials h4 {
    margin-bottom: 8px;
}

.guest-footer {
    text-align: center;
    color: #fff;
    font-size: 13px;
    opacity: 0.8;
}

/* Pagination */
.pagination {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.pagination-link {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
}

.pagination-link:hover {
    background: #f8f9fa;
}

.pagination-link.active {
    background: #4CAF50;
    color: #fff;
    border-color: #4CAF50;
}

.pagination-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

.pagination-info {
    font-size: 13px;
    color: #6c757d;
    margin-top: 8px;
}

/* Search Bar */
.search-bar {
    margin-bottom: 20px;
}

.search-bar form {
    display: flex;
    gap: 12px;
}

.search-bar input[type="text"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.info-item label {
    font-weight: 600;
    display: block;
    margin-bottom: 4px;
}

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

.stat-card {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.stat-card h4 {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 4px;
}

.stat-rate {
    font-size: 14px;
    color: #28a745;
}

/* Progress Bars */
.usage-bars {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.usage-item label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
}

.progress-bar {
    height: 24px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 4px;
}

.progress-fill {
    height: 100%;
    background: #4CAF50;
    transition: width 0.3s;
}

.usage-item span {
    font-size: 13px;
    color: #6c757d;
}

/* Activity List */
.activity-list {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    padding: 12px 0;
    border-bottom: 1px solid #e1e8ed;
}

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

.activity-item strong {
    display: block;
    margin-bottom: 4px;
}

.activity-item p {
    font-size: 13px;
    margin-bottom: 4px;
}

.activity-item small {
    font-size: 12px;
    color: #6c757d;
}
