/* AvisoAlToque - Dashboard Styles */

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Navbar */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

.navbar-brand a {
    color: white;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: bold;
}

.navbar-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
}

.logout-form {
    display: inline;
}

.logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Typography */
h1 {
    margin-bottom: 20px;
    color: #2c3e50;
}

h2 {
    margin-bottom: 15px;
    color: #34495e;
    font-size: 1.3rem;
}

h3 {
    margin-bottom: 10px;
    color: #7f8c8d;
    font-size: 0.9rem;
    text-transform: uppercase;
}

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

.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card-success {
    border-left: 4px solid #27ae60;
}

.card-warning {
    border-left: 4px solid #f39c12;
}

.card-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.card-detail {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-top: 5px;
}

/* Sections */
.section {
    margin-bottom: 30px;
}

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

.section-info {
    color: #7f8c8d;
    margin-bottom: 15px;
}

/* Tables */
.table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-collapse: collapse;
}

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

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

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

.message-cell {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.error-cell {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #e74c3c;
    font-size: 0.85rem;
}

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

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

.badge-warning {
    background-color: #fff3cd;
    color: #856404;
}

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

.badge-muted {
    background-color: #e9ecef;
    color: #6c757d;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
    transition: background-color 0.2s;
}

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

.btn-primary:hover {
    background-color: #2980b9;
}

.btn-secondary {
    background-color: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background-color: #7f8c8d;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

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

.btn-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.form-help {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #7f8c8d;
}

/* Alerts/Messages */
.alert {
    padding: 12px 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

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

.page-info {
    color: #7f8c8d;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    background: white;
    border-radius: 8px;
    color: #7f8c8d;
}

/* Login Page */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #2c3e50, #3498db);
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.login-box h1 {
    color: #2c3e50;
    margin-bottom: 5px;
}

.login-box .subtitle {
    color: #7f8c8d;
    margin-bottom: 30px;
}

.login-form {
    text-align: left;
}

.login-help {
    margin-top: 20px;
    font-size: 0.9rem;
    color: #7f8c8d;
}

/* Settings Page */
.settings-form {
    max-width: 400px;
}

.status-connected,
.status-disconnected {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #27ae60;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.status-disconnected .status-icon {
    background-color: #f39c12;
}

.status-info {
    flex: 1;
}

.status-info p {
    margin: 5px 0;
    color: #7f8c8d;
}

.current-value {
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.account-info p {
    margin: 10px 0;
}

.account-info code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85rem;
}

/* Error Page */
.error-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.error-container {
    text-align: center;
    padding: 40px;
}

.error-container h1 {
    font-size: 3rem;
    color: #e74c3c;
}

/* Utilities */
.text-warning {
    color: #f39c12;
}

.text-muted {
    color: #7f8c8d;
}

.text-success {
    color: #27ae60;
}
