/* Global styles */
body {
    font-family: Arial, sans-serif;
    background-image: url('../images/soapnote.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.header {
    background-color: rgba(51, 51, 51, 0.95);
    padding: 1rem 2rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-btn {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid white;
    border-radius: 4px;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.nav-btn:hover {
    background-color: white;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.template-container {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.template-stats {
    display: flex;
    gap: 15px;
}

.stat-item {
    background-color: #f5f5f5;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
}

.template-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.template-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.template-name {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}

.template-meta {
    font-size: 0.8rem;
    color: #777;
    margin-bottom: 15px;
}

.template-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.action-btn {
    background-color: #333;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.action-btn:hover {
    background-color: #555;
}

.draft-badge {
    background-color: #ffc107;
    color: #212529;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 10px;
}

.complete-badge {
    background-color: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 10px;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #777;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: #ddd;
}

.tab-buttons {
    display: flex;
    margin-bottom: 20px;
}

.tab-btn {
    padding: 10px 20px;
    background-color: #f5f5f5;
    border: none;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px 4px 0 0;
    border: 1px solid #ddd;
    border-bottom: none;
}

.tab-btn.active {
    background-color: white;
    border-bottom: 1px solid white;
    position: relative;
    z-index: 1;
}

.tab-btn:not(:first-child) {
    margin-left: -1px;
}

.tab-content {
    display: none;
    border-top: 1px solid #ddd;
    margin-top: -1px;
    padding-top: 20px;
}

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

.search-container {
    margin-bottom: 20px;
}

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

/* Additional styles for specific pages */
.login-container, .register-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.submit-btn {
    width: 100%;
    padding: 10px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #444;
}

.error, .success {
    margin-bottom: 10px;
    padding: 10px;
    border-radius: 4px;
}

.error {
    color: red;
    background-color: rgba(255, 0, 0, 0.1);
}

.success {
    color: green;
    background-color: rgba(0, 255, 0, 0.1);
}

.back-link {
    text-align: center;
    margin-top: 15px;
}

.back-link a {
    color: #333;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

/* Styles for view_template.php */
.template-container {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}

.template-meta {
    display: flex;
    gap: 15px;
    color: #777;
    font-size: 0.9rem;
}

.draft-badge {
    background-color: #ffc107;
    color: #212529;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 10px;
}

.complete-badge {
    background-color: #28a745;
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 10px;
}

.template-content {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: white;
    margin-bottom: 20px;
}

.action-btn {
    padding: 8px 15px;
    margin-right: 10px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.action-btn:hover {
    background-color: #555;
    color: white;
    text-decoration: none;
}

.error-container {
    background-color: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Styles for includes/header.php */
.main-header {
    background-color: rgba(51, 51, 51, 0.95);
    padding: 0.5rem 1rem;
    color: white;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1000;
}

.logo-img {
    height: 40px;
    width: 40px;
    border-radius: 6px;
    object-fit: contain;
    margin-right: 10px;
}

.site-name {
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
    color: white;
}

/* Styles for templates/header.php */
.main-header {
    background-color: rgba(51, 51, 51, 0.95);
    padding: 1rem 2rem;
    color: white;
    margin-bottom: 2rem;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

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

.btn-logout {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid white;
    border-radius: 4px;
    transition: all 0.3s;
}

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

/* Styles for index.php */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-image: url('../images/soapnote.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
}

.header {
    background-color: rgba(51, 51, 51, 0.95);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.nav-button {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin-left: 1rem;
    border: 1px solid white;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.nav-button:hover {
    background-color: white;
    color: #333;
}

.main-content {
    padding-top: 80px;
    /* Add any additional content styling here */
}

/* Styles for admin.php */
body {
    background-color: #f4f4f4;
}

.header {
    background-color: #333;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-btn {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid white;
    border-radius: 4px;
}

.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.users-table {
    width: 100%;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-collapse: collapse;
}

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

.users-table th {
    background-color: #f8f9fa;
}

.status-active { color: green; }
.status-suspended { color: red; }

.action-btn {
    padding: 5px 10px;
    margin: 0 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.suspend-btn { background-color: #dc3545; color: white; }
.activate-btn { background-color: #28a745; color: white; }
.delete-btn { background-color: #6c757d; color: white; }

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    max-width: 400px;
    margin: 100px auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #666;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: bold;
}

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

.password-group {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 35px;
    cursor: pointer;
    color: #666;
}

.action-btn {
    width: 100%;
    padding: 10px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.3s ease;
}

.action-btn:hover {
    background-color: #444;
}

/* Styles for create_template.php */
.editor-section {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

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

.section-title {
    font-size: 1.5em;
    color: #333;
    margin: 0;
}

textarea {
    flex: 1;
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: monospace;
    font-size: 14px;
    resize: none;
}

.controls {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.models-btn {
    margin-bottom: 15px;
    padding: 10px 20px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.models-btn:hover {
    background-color: #444;
}

.models-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.models-content {
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    position: relative;
}

.models-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.model-item {
    background-color: #f5f5f5;
    padding: 15px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.model-item:hover {
    background-color: #e0e0e0;
    transform: translateY(-2px);
}

.close-models {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-models:hover {
    color: #666;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #333;
}

.form-group input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.checkbox-group {
    margin-top: 10px;
}

.preview-area {
    margin-top: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
    font-family: monospace;
}

.preview-container {
    flex: 1;
    background: white;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow-y: auto;
}

.preview-container textarea {
    font-family: Arial, sans-serif;
    margin-bottom: 15px;
}

.preview-container h1, 
.preview-container h2 {
    margin-bottom: 15px;
    color: #333;
}

.preview-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #333;
}

/* Styles for admin/index.php */
.card {
    transition: transform 0.2s;
}

.card:hover {
    transform: translateY(-5px);
}

.card-title {
    color: #333;
    font-weight: bold;
}

.card-text {
    color: #666;
}
