/* Base Styles */
:root {
    --primary-color: #25D366;
    --secondary-color: #128C7E;
    --dark-color: #075E54;
    --light-color: #DCF8C6;
    --danger-color: #009E77;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-gray: #f8f9fa;
    --dark-gray: #343a40;
    --white: #ffffff;
    --black: #000000;
}

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

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

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header Styles */
header {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header .logo h1 {
    font-size: 1.5rem;
    margin: 0;
}

header .logo a {
    color: var(--white);
    text-decoration: none;
}

nav ul {
    display: flex;
    list-style: none;
    margin-top: 1rem;
}

nav ul li {
    margin-right: 1.5rem;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
}

nav ul li a i {
    margin-right: 0.5rem;
}

/* Main Content Styles */
main {
    padding: 2rem 0;
    min-height: calc(100vh - 150px);
}

/* Footer Styles */
footer {
    background-color: var(--dark-color);
    color: var(--white);
    padding: 1.5rem 0;
    text-align: center;
}

footer p {
    margin-bottom: 1rem;
}

footer nav ul {
    justify-content: center;
}

footer nav ul li a {
    color: rgba(255,255,255,0.8);
}

footer nav ul li a:hover {
    color: var(--white);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.2);
}

.form-text {
    display: block;
    margin-top: 0.25rem;
    color: #6c757d;
    font-size: 0.875rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.3s;
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

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

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

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

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

/* Alert Styles */
.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: 4px;
}

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

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

/* Login Styles */
.login-container {
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--dark-color);
}

.forgot-password {
    text-align: center;
    margin-top: 1.5rem;
}

.forgot-password a {
    color: var(--secondary-color);
    text-decoration: none;
}

.forgot-password a:hover {
    text-decoration: underline;
}

/* Dashboard Styles */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    text-align: center;
}

.stat-card h3 {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.stat-card p {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.balance-amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--dark-color);
    text-align: center;
    margin: 1rem 0;
}

/* Table Styles */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5rem;
    background-color: var(--white);
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
}

table th, table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

table th {
    background-color: var(--dark-color);
    color: var(--white);
    font-weight: 500;
}

table tr:hover {
    background-color: rgba(220, 248, 198, 0.2);
}

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

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

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-pending {
    background-color: #fff3cd;
    color: #856404;
}

.status-sent {
    background-color: #cce5ff;
    color: #004085;
}

.status-delivered {
    background-color: #d4edda;
    color: #155724;
}

.status-read {
    background-color: var(--light-color);
    color: var(--dark-color);
}

.status-failed {
    background-color: #f8d7da;
    color: #721c24;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

.page-link {
    padding: 0.5rem 1rem;
    margin: 0 0.25rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: var(--dark-color);
    text-decoration: none;
    transition: all 0.3s;
}

.page-link:hover {
    background-color: #f1f1f1;
}

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

/* Profile Styles */
.profile-section, .password-section, .tokens-section {
    background-color: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
}

.profile-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.detail {
    margin-bottom: 1rem;
}

.detail label {
    font-weight: 500;
    color: #6c757d;
}

.detail span {
    display: block;
    margin-top: 0.25rem;
}

.token-value {
    font-family: monospace;
}

.inline-form {
    display: inline-block;
    margin-left: 0.5rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
    }
    
    nav ul li {
        margin-right: 0;
        margin-bottom: 0.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 576px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .login-container {
        padding: 1.5rem;
    }
}

.copy-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #28a745;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 1000;
    animation: fadeInOut 2s ease-in-out;
}

.copy-toast.error {
    background-color: #dc3545;
}

@keyframes fadeInOut {
    0% { opacity: 0; bottom: 0; }
    20% { opacity: 1; bottom: 20px; }
    80% { opacity: 1; bottom: 20px; }
    100% { opacity: 0; bottom: 0; }
}