diff --git a/app.py b/app.py
index cc962ca..807be11 100644
--- a/app.py
+++ b/app.py
@@ -4,7 +4,7 @@ Simple Tablet Lending and Return Management Web Application
with SQLite backend
"""
-from flask import Flask, render_template, request, redirect, url_for, flash, make_response, session
+from flask import Flask, render_template, request, redirect, url_for, flash
import sqlite3
import os
from datetime import datetime
@@ -25,41 +25,15 @@ app.config['BABEL_TRANSLATION_DIRECTORIES'] = 'translations'
# Locale selector function
def get_locale():
- # Try to get language from cookie
- lang = request.cookies.get('language')
+ # Try to get language from URL parameter
+ lang = request.args.get('lang')
if lang and lang in app.config['LANGUAGES']:
return lang
# Try to get from session
if hasattr(request, 'session') and 'language' in request.session:
return request.session['language']
- # Default to Spanish (es) for internal app
- return 'es'
-
-
-# Before request handler to set language from URL param and persist to cookie/session
-@app.before_request
-def handle_language():
- lang = request.args.get('lang')
- if lang and lang in app.config['LANGUAGES']:
- # Store in session
- session['language'] = lang
- # Set cookie for longer persistence (1 year)
- # Note: We need to use response.set_cookie, but before_request can't modify response
- # So we'll handle this in a separate route
- return None
-
-
-# Language switcher endpoint
-@app.route('/set_language')
-def set_language():
- lang = request.args.get('lang')
- if lang and lang in app.config['LANGUAGES']:
- session['language'] = lang
- # Set cookie
- resp = make_response(redirect(request.referrer or '/'))
- resp.set_cookie('language', lang, max_age=31536000) # 1 year
- return resp
- return redirect(request.referrer or '/')
+ # Try to get from browser preferences
+ return request.accept_languages.best_match(app.config['LANGUAGES'].keys())
# Initialize Babel with locale selector
babel = Babel(app, locale_selector=get_locale)
diff --git a/docs/CORPORATE_DESIGN.md b/docs/CORPORATE_DESIGN.md
deleted file mode 100644
index eae6bed..0000000
--- a/docs/CORPORATE_DESIGN.md
+++ /dev/null
@@ -1,176 +0,0 @@
-# Corporate Design Specifications
-
-## Overview
-
-This document defines the corporate design specifications for the Tablet Management System, including color palette, logo usage, and branding guidelines.
-
----
-
-## Color Palette
-
-### Primary Corporate Colors
-
-The following three colors constitute the official corporate color palette:
-
-| Color Name | Hex Code | RGB | Usage |
-|------------|----------|-----|-------|
-| **Cobalt Blue** | `#1338BE` | rgb(19, 56, 190) | Primary brand color, headers, navigation, main actions |
-| **Tiger Orange** | `#FC6A03` | rgb(252, 106, 3) | Accents, highlights, loading indicators, secondary actions |
-| **Emerald Green** | `#028A0F` | rgb(2, 138, 15) | Success states, positive feedback, confirmation |
-
-### Color Shades
-
-Each corporate color has been extended with a full shade range (50-900) for use in Tailwind CSS:
-
-#### Cobalt Blue Shades
-- `cobalt-50`: `#f0f5ff` (Lightest)
-- `cobalt-100`: `#e0eaff`
-- `cobalt-200`: `#b3c6ff`
-- `cobalt-300`: `#80a0ff`
-- `cobalt-400`: `#4d7aff`
-- **`cobalt-500`: `#1338BE`** (Primary)
-- `cobalt-600`: `#0f2a9c`
-- `cobalt-700`: `#0b1f72`
-- `cobalt-800`: `#081552`
-- `cobalt-900`: `#060f38` (Darkest)
-
-#### Tiger Orange Shades
-- `tiger-50`: `#fff8f0` (Lightest)
-- `tiger-100`: `#ffe8d6`
-- `tiger-200`: `#ffccab`
-- `tiger-300`: `#ffae80`
-- `tiger-400`: `#ff8c55`
-- **`tiger-500`: `#FC6A03`** (Primary)
-- `tiger-600`: `#e05a00`
-- `tiger-700`: `#b84500`
-- `tiger-800`: `#8c3300`
-- `tiger-900`: `#662500` (Darkest)
-
-#### Emerald Green Shades
-- `emerald-50`: `#f0fdf4` (Lightest)
-- `emerald-100`: `#dcfce7`
-- `emerald-200`: `#bbf7d0`
-- `emerald-300`: `#86efac`
-- `emerald-400`: `#4ade80`
-- **`emerald-500`: `#028A0F`** (Primary)
-- `emerald-600`: `#006b0c`
-- `emerald-700`: `#005209`
-- `emerald-800`: `#003d07`
-- `emerald-900`: `#002904` (Darkest)
-
----
-
-## Logo Usage
-
-### Logo File
-- **File**: `assets/Schamann.png`
-- **Dimensions**: 175 x 161 pixels
-- **Format**: PNG with transparency
-- **Web Path**: `/static/Schamann.png`
-
-### Display Guidelines
-- The logo should be displayed at a fixed height of 40px in the header
-- Use `object-contain` to maintain aspect ratio
-- The logo should appear to the left of the application title
-- Do not stretch or distort the logo
-
-### Implementation
-```html
-
-```
-
----
-
-## Usage Examples
-
-### Headers and Navigation
-```html
-
-
-
-
-