/**
 * Crypto Tracker Stylesheet
 */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f7f9;
    color: #333;
    margin: 0;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    background: #ffffff;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    position: relative;
}

/* --- Login Page --- */
.login-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f4f7f9;
}

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

.login-container form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.login-container .g-recaptcha {
    margin: 10px auto;
}

.error {
    color: #d9534f;
    text-align: center;
    margin: 10px 0;
}

/* --- Buttons & Links --- */
.logout-btn {
    position: absolute;
    top: 25px;
    right: 25px;
    padding: 8px 12px;
    background-color: #d9534f;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background-color: #c9302c;
}

.export-btn {
    float: right;
    padding: 8px 12px;
    background-color: #28a745;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.export-btn:hover {
    background-color: #218838;
}

/* --- Headings --- */
h1, h2 {
    color: #2c3e50;
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 2em;
    margin-bottom: 30px;
}

h2 {
    font-size: 1.5em;
    border-bottom: 2px solid #ecf0f1;
    padding-bottom: 10px;
    margin-bottom: 25px;
}

/* --- Dashboard --- */
.dashboard {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9fafb;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.dashboard-item {
    background: #ffffff;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #e0e0e0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.dashboard-item h3 {
    margin-top: 0;
    color: #3498db;
}

.dashboard-item p {
    margin: 5px 0;
    font-size: 1.1em;
}

.dashboard-item .profit { color: #27ae60; }
.dashboard-item .loss { color: #c0392b; }

.dashboard-item .view-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s;
}
.dashboard-item .view-btn:hover {
    background-color: #2980b9;
}

/* --- Forms & Containers --- */
.form-container, .portfolio-container, .calculator-container {
    margin-bottom: 30px;
    padding: 25px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: #fdfdfd;
}

form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    align-items: center;
}

form input, form select, form button {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

form button {
    background-color: #3498db;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

form button:hover {
    background-color: #2980b9;
}

/* --- Tables --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

thead {
    background-color: #ecf0f1;
}

th, td {
    padding: 15px;
    border: 1px solid #ddd;
    text-align: left;
    font-size: 14px;
}

th {
    font-weight: 600;
}

tbody tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* --- Calculator --- */
#profit-target {
    margin-top: 15px;
    font-weight: bold;
    text-align: center;
    font-size: 1.1em;
}

/* --- Instructions --- */
.setup-instructions {
    margin-top: 25px;
    padding: 15px;
    background: #fcf8e3;
    border: 1px solid #fbeed5;
    border-radius: 5px;
    font-size: 14px;
    color: #c09853;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    h1 { font-size: 1.8em; }
    h2 { font-size: 1.3em; }
    form { grid-template-columns: 1fr; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .logout-btn {
        position: static;
        display: block;
        width: 100px;
        margin: 0 auto 20px;
        text-align: center;
    }
}

/* --- Action Buttons --- */
.actions {
    display: flex;
    gap: 10px;
}

.action-btn {
    padding: 5px 10px;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    transition: background-color 0.3s;
    background-color: #3498db; /* Blue for edit */
}

.action-btn:hover {
    opacity: 0.9;
}

.action-btn.delete {
    background-color: #e74c3c; /* Red for delete */
}
